From 86c0b6527f5737560419c4c61f30b05997565908 Mon Sep 17 00:00:00 2001 From: Adam Domurad Date: Tue, 27 Aug 2013 16:53:30 -0400 Subject: Do not wait for applet initialization when binding Java applets for NPAPI. --- tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc') diff --git a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc index bb2b376..b5c893c 100644 --- a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc +++ b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc @@ -66,16 +66,15 @@ SUITE(IcedTeaScriptableJavaObject) { TEST(get_scriptable_java_object) { MemoryLeakDetector leak_detector; - NPObject* first_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); - browser_functions.releaseobject(first_obj); + /* Ensure freeing*/ { + NPObjectRef first_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); - /* After the first call, the object should be cached in the object map */ - NPObject* second_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); + /* After the first call, the object should be cached in the object map */ + NPObjectRef second_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false); - /* Objects should be the same, because of caching */ - CHECK(first_obj == second_obj); - - browser_functions.releaseobject(second_obj); + /* Objects should be the same, because of caching */ + CHECK(first_obj.get() == second_obj.get()); + } CHECK(leak_detector.memory_leaks() == 0); } -- cgit v1.2.3