aboutsummaryrefslogtreecommitdiffstats
path: root/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc
diff options
context:
space:
mode:
authorAdam Domurad <[email protected]>2013-06-21 12:47:45 -0400
committerAdam Domurad <[email protected]>2013-06-21 12:47:45 -0400
commita14e2d60ae4b77609973d7e35959c1edb04280fc (patch)
treecc6b11c2f9d09438fc55056f1031ec83c2d2e2ff /tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc
parentb30dceba4363f445d9febf52e1788d63cc440a08 (diff)
Move 'get_scriptable_java_package_object' and 'get_scriptable_java_object' into their correct respective classes.
Diffstat (limited to 'tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc')
-rw-r--r--tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc36
1 files changed, 18 insertions, 18 deletions
diff --git a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc
index 0827570..9de0bbd 100644
--- a/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc
+++ b/tests/cpp-unit-tests/IcedTeaScriptablePluginObjectTest.cc
@@ -53,13 +53,6 @@ SUITE(IcedTeaScriptablePluginObject) {
delete obj;
CHECK(leak_detector.memory_leaks() == 0);
}
-
- TEST(get_scriptable_java_object) {
- MemoryLeakDetector leak_detector;
- NPObject* obj = IcedTeaScriptablePluginObject::get_scriptable_java_package_object(&dummy_npp, "DummyPackage");
- browser_functions.releaseobject(obj);
- CHECK(leak_detector.memory_leaks() == 0);
- }
}
SUITE(IcedTeaScriptableJavaObject) {
@@ -69,24 +62,15 @@ SUITE(IcedTeaScriptableJavaObject) {
IcedTeaScriptableJavaObject::deAllocate(obj);
CHECK(leak_detector.memory_leaks() == 0);
}
-}
-
-SUITE(IcedTeaScriptableJavaPackageObject) {
- TEST(deallocate) {
- MemoryLeakDetector leak_detector;
- IcedTeaScriptableJavaPackageObject* obj = new IcedTeaScriptableJavaPackageObject(&dummy_npp);
- IcedTeaScriptableJavaPackageObject::deAllocate(obj);
- CHECK(leak_detector.memory_leaks() == 0);
- }
TEST(get_scriptable_java_object) {
MemoryLeakDetector leak_detector;
- NPObject* first_obj = IcedTeaScriptableJavaPackageObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false);
+ NPObject* first_obj = IcedTeaScriptableJavaObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false);
browser_functions.releaseobject(first_obj);
/* After the first call, the object should be cached in the object map */
- NPObject* second_obj = IcedTeaScriptableJavaPackageObject::get_scriptable_java_object(&dummy_npp, "DummyClass", "DummyInstance", false);
+ NPObject* 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);
@@ -96,3 +80,19 @@ SUITE(IcedTeaScriptableJavaPackageObject) {
CHECK(leak_detector.memory_leaks() == 0);
}
}
+
+SUITE(IcedTeaScriptableJavaPackageObject) {
+ TEST(deallocate) {
+ MemoryLeakDetector leak_detector;
+ IcedTeaScriptableJavaPackageObject* obj = new IcedTeaScriptableJavaPackageObject(&dummy_npp);
+ IcedTeaScriptableJavaPackageObject::deAllocate(obj);
+ CHECK(leak_detector.memory_leaks() == 0);
+ }
+
+ TEST(get_scriptable_java_object) {
+ MemoryLeakDetector leak_detector;
+ NPObject* obj = IcedTeaScriptableJavaPackageObject::get_scriptable_java_package_object(&dummy_npp, "DummyPackage");
+ browser_functions.releaseobject(obj);
+ CHECK(leak_detector.memory_leaks() == 0);
+ }
+}