Back to index

lightning-sunbird  0.9+nobinonly
Functions
IsJavaEnabled.cpp File Reference
#include "JVMManagerTests.h"

Go to the source code of this file.

Functions

 JM_OJIAPITest (JVMManager_IsJavaEnabled_1)
 JM_OJIAPITest (JVMManager_IsJavaEnabled_2)
 JM_OJIAPITest (JVMManager_IsJavaEnabled_3)

Function Documentation

JM_OJIAPITest ( JVMManager_IsJavaEnabled_1  )

Definition at line 41 of file IsJavaEnabled.cpp.

                                          {
       GET_JM_FOR_TEST

       nsresult rc = jvmMgr->IsJavaEnabled(nsnull);
       if (NS_FAILED(rc))
              return TestResult::PASS("Method should fail because no space is allocated for the result pointer.");
       return TestResult::FAIL("GetProxyJNI", rc);

}

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_IsJavaEnabled_2  )

Definition at line 51 of file IsJavaEnabled.cpp.

                                          {
       GET_JM_FOR_TEST
       PRBool b;

       nsresult rc = jvmMgr->IsJavaEnabled(&b);
       if (NS_SUCCEEDED(rc) && b == PR_TRUE) {
              return TestResult::PASS("Should PASS if security.enable_java property is set to true or ommited.");
       }
       return TestResult::FAIL("IsJavaEnabled", rc);
}

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_IsJavaEnabled_3  )

Definition at line 63 of file IsJavaEnabled.cpp.

                                          {
       GET_JM_FOR_TEST
       PRBool b;

       //how can we disable Java ????? -> this test doesn't work
       nsresult rc = jvmMgr->IsJavaEnabled(&b);
       if (NS_SUCCEEDED(rc) && b == PR_FALSE) {
              return TestResult::PASS("Should PASS if security.enable_java property is set to false.");
       }
       return TestResult::FAIL("To make this test pass one should delete OJI plugin !");

}

Here is the call graph for this function: