test_bug790732.html (1667B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=790732 5 --> 6 <head> 7 <meta charset="utf-8"> 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(); 13 14 async function doTest() { 15 await SpecialPowers.pushPrefEnv({set: [["dom.use_components_shim", true]]}) 16 17 // Basic stuff 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"); 22 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 26 // same. 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.nsIDOMUIEvent, UIEvent); 33 is(Ci.nsIDOMHTMLMediaElement, HTMLMediaElement); 34 is(Ci.nsIDOMRange, Range); 35 is(Ci.nsIDOMNodeFilter, NodeFilter); 36 is(Ci.nsIDOMXPathResult, XPathResult); 37 38 SimpleTest.finish(); 39 } 40 41 doTest(); 42 </script> 43 </head> 44 <body> 45 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=790732">Mozilla Bug 790732</a> 46 <p id="display"></p> 47 <div id="content" style="display: none"> 48 49 </div> 50 <pre id="test"> 51 </pre> 52 <iframe id="ifr"></iframe> 53 </body> 54 </html>