Back to index

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

Go to the source code of this file.

Functions

 JM_OJIAPITest (JVMManager_GetProxyJNI_1)
 JM_OJIAPITest (JVMManager_GetProxyJNI_2)
 JM_OJIAPITest (JVMManager_GetProxyJNI_3)

Function Documentation

JM_OJIAPITest ( JVMManager_GetProxyJNI_1  )

Definition at line 41 of file GetProxyJNI.cpp.

                                        {
       GET_JM_FOR_TEST
       nsresult rc = jvmMgr->GetProxyJNI(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_GetProxyJNI_2  )

Definition at line 49 of file GetProxyJNI.cpp.

                                        {
       GET_JM_FOR_TEST
       JNIEnv *jniEnv;

       nsresult rc = jvmMgr->GetProxyJNI(&jniEnv);      
       if (NS_SUCCEEDED(rc))
              return TestResult::PASS("Method should work OK though we didn't call CreateProxyJNI before.");
       return TestResult::FAIL("GetProxyJNI", rc);

}

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_GetProxyJNI_3  )

Definition at line 60 of file GetProxyJNI.cpp.

                                        {
       GET_JM_FOR_TEST
       JNIEnv *jniEnv;
       nsresult rc = jvmMgr->CreateProxyJNI(nsnull, &jniEnv);

       if (NS_SUCCEEDED(rc)) {
              rc = jvmMgr->GetProxyJNI(&jniEnv); 
              if (NS_SUCCEEDED(rc))
                     return TestResult::PASS("Before calling GetProxyJNI CreateProxyJNI method is called.");
              return TestResult::FAIL("GetProxyJNI", rc);             
       }
       return TestResult::FAIL("Can't create ProxyJNI.");             
}

Here is the call graph for this function: