4 https://bugzilla.mozilla.org/show_bug.cgi?id=790732
8 <title>Test for Bug
790732</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
12 SimpleTest.waitForExplicitFinish();
14 async function doTest() {
15 await SpecialPowers.pushPrefEnv({set: [[
"dom.use_components_shim", true]]})
18 ok(Components,
"Components shim exists!");
19 var Ci = Components.interfaces;
20 ok(Ci,
"interfaces shim exists!");
21 is(typeof Components.classes, 'undefined',
"Shouldn't have a Cc");
23 // Check each interface that we shim. We start by checking specific
24 // constants for a couple of interfaces, and then once it's pretty clear that
25 // it's working as intended we just check that the objects themselves are the
27 is(Ci.nsIXMLHttpRequest.HEADERS_RECEIVED, XMLHttpRequest.HEADERS_RECEIVED);
28 is(Ci.nsIDOMNode.DOCUMENT_NODE, Node.DOCUMENT_NODE);
29 is(Ci.nsIDOMKeyEvent, KeyEvent);
30 is(Ci.nsIDOMMouseEvent, MouseEvent);
31 is(Ci.nsIDOMMouseScrollEvent, MouseScrollEvent);
32 is(Ci.nsIDOMMutationEvent, MutationEvent);
33 is(Ci.nsIDOMUIEvent, UIEvent);
34 is(Ci.nsIDOMHTMLMediaElement, HTMLMediaElement);
35 is(Ci.nsIDOMRange, Range);
36 is(Ci.nsIDOMNodeFilter, NodeFilter);
37 is(Ci.nsIDOMXPathResult, XPathResult);
46 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=790732">Mozilla Bug
790732</a>
48 <div id=
"content" style=
"display: none">
53 <iframe id=
"ifr"></iframe>