diff options
author | Adam Domurad <[email protected]> | 2013-08-27 16:53:30 -0400 |
---|---|---|
committer | Adam Domurad <[email protected]> | 2013-08-27 16:53:30 -0400 |
commit | 86c0b6527f5737560419c4c61f30b05997565908 (patch) | |
tree | 7d288e6c7cb36cd9a8ba7132217ae28f75410572 /tests | |
parent | 6fbf033b59cff6cedf9d31411835ab01938e048e (diff) |
Do not wait for applet initialization when binding Java applets for NPAPI.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc | 15 |
1 files changed, 7 insertions, 8 deletions
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); } |