Lines Matching defs:xpcom
38 """Tests the "xpcom.components" object.
41 import xpcom.components
48 "Test the xpcom.components.interfaces object"
50 iid = xpcom.components.interfaces.nsISupports
51 assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
52 iid = xpcom.components.interfaces['nsISupports']
53 assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
57 for name, iid in xpcom.components.interfaces.items():
61 assert iid == xpcom._xpcom.IID_nsISupports, "Got the wrong IID!"
62 assert xpcom.components.interfaces[name] == iid
64 assert len(xpcom.components.interfaces.keys()) == len(xpcom.components.interfaces.values()) == \
65 len(xpcom.components.interfaces.items()) == len(xpcom.components.interfaces) == \
72 clsid = xpcom.components.ID("{bda17d50-0d6b-11d3-9331-00104ba0fd40}")
75 klass = xpcom.components.classes[prog_id]
80 for name, klass in xpcom.components.classes.items():
86 # xpcom appears to add charset info to the contractid!?
87 # assert xpcom.components.classes[name].contractid == prog_id, "Expected '%s', got '%s'" % (prog_id, xpcom.components.classes[name].contractid)
89 if len(xpcom.components.classes.keys()) == len(xpcom.components.classes.values()) == \
90 len(xpcom.components.classes.items()) == len(xpcom.components.classes) == \
101 id = xpcom.components.ID(str(xpcom._xpcom.IID_nsISupports))
102 assert id == xpcom._xpcom.IID_nsISupports