Back to index

lightning-sunbird  0.9+nobinonly
Classes | Functions | Variables
test_misc Namespace Reference

Classes

class  TestDumpInterfaces
class  TestEnumContractIDs
class  TestSampleComponent
class  TestIIDs
class  TestRepr
class  TestUnwrap

Functions

def get_sample_component_cpp
def get_sample_component_js

Variables

int verbose_level = 0
int reportedSampleMissing = 0
tuple ni = xpcom._xpcom._GetInterfaceCount()
tuple ng = xpcom._xpcom._GetGatewayCount()

Function Documentation

Definition at line 53 of file test_misc.py.

00053 
00054 def get_sample_component_cpp():
00055     global reportedSampleMissing
00056     contractid = "@mozilla.org/sample;1" # The C++ version.
00057     try:
00058         return xpcom.components.classes[contractid].createInstance()
00059     except xpcom.COMException:
00060         if not reportedSampleMissing:
00061             print "***"
00062             print "*** This test requires an XPCOM sample component,"
00063             print "*** which does not exist.  To build this test, you"
00064             print "*** should change to the 'mozilla/xpcom/sample' directory,"
00065             print "*** and run 'make', then run this test again."
00066             print "***"
00067             reportedSampleMissing = 1
00068         else:
00069             print "(skipping - no C++ sample...) ",
00070         return None

Here is the caller graph for this function:

Definition at line 71 of file test_misc.py.

00071 
00072 def get_sample_component_js():
00073     # This should *always* exist - no special make process.
00074     contractid = "@mozilla.org/jssample;1" # the JS version
00075     return xpcom.components.classes[contractid].createInstance()
    

Here is the caller graph for this function:


Variable Documentation

tuple test_misc.ng = xpcom._xpcom._GetGatewayCount()

Definition at line 230 of file test_misc.py.

tuple test_misc.ni = xpcom._xpcom._GetInterfaceCount()

Definition at line 229 of file test_misc.py.

Definition at line 51 of file test_misc.py.

Definition at line 49 of file test_misc.py.