Back to index

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

Go to the source code of this file.

Functions

 JM_OJIAPITest (JVMManager_CreateProxyJNI_1)
 JM_OJIAPITest (JVMManager_CreateProxyJNI_2)
 JM_OJIAPITest (JVMManager_CreateProxyJNI_3)
 JM_OJIAPITest (JVMManager_CreateProxyJNI_4)

Function Documentation

JM_OJIAPITest ( JVMManager_CreateProxyJNI_1  )

Definition at line 43 of file CreateProxyJNI.cpp.

                                           {
       GET_JM_FOR_TEST
       JNIEnv *jniEnv;

       nsresult rc = jvmMgr->CreateProxyJNI(nsnull, &jniEnv);  
       if (NS_SUCCEEDED(rc) && jniEnv)
              return TestResult::PASS("First paramenter CAN be NULL.");
       return TestResult::FAIL("CreateProxyJNI", rc);
}

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_CreateProxyJNI_2  )

Definition at line 54 of file CreateProxyJNI.cpp.

                                           {
       GET_JM_FOR_TEST
       //JNIEnv **jniEnv = nsnull;

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

}

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_CreateProxyJNI_3  )

Definition at line 67 of file CreateProxyJNI.cpp.

                                           {
       GET_JM_FOR_TEST
       //JNIEnv **jniEnv = nsnull;
       nsISecureEnv *secureEnv = new nsDummySecureEnv();

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

Here is the call graph for this function:

JM_OJIAPITest ( JVMManager_CreateProxyJNI_4  )

Definition at line 80 of file CreateProxyJNI.cpp.

                                           {
       GET_JM_FOR_TEST
       JNIEnv *jniEnv;
       nsISecureEnv *secureEnv = new nsDummySecureEnv();

       nsresult rc = jvmMgr->CreateProxyJNI(secureEnv, &jniEnv);      
       if (NS_SUCCEEDED(rc) && jniEnv)
              return TestResult::PASS("Method should work OK.");
       return TestResult::FAIL("CreateProxyJNI", rc);
}

Here is the call graph for this function: