test_bug1287912.html (1343B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1287912 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1287912</title> 9 <script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1287912">Mozilla Bug 1287912</a> 14 <p id="display"></p> 15 <div id="content" style="display: none"> 16 <iframe id="t" src="http://example.org/tests/dom/bindings/test/"></iframe> 17 </div> 18 <pre id="test"> 19 <script type="application/javascript"> 20 function test() { 21 var win = document.getElementById("t").contentWindow; 22 is(Object.getPrototypeOf(win.Image), win.Function.prototype, "The __proto__ of a named constructor is Function.prototype"); 23 is(win.Image.prototype, win.HTMLImageElement.prototype, "The prototype property of a named constructor is the interface prototype object"); 24 is(win.HTMLImageElement.foo, undefined, "Should not have a property named foo on the HTMLImageElement interface object"); 25 is(win.Image.foo, undefined, "Should not have a property named foo on the Image named constructor"); 26 27 SimpleTest.finish(); 28 } 29 30 SimpleTest.waitForExplicitFinish(); 31 addLoadEvent(test); 32 33 </script> 34 </pre> 35 </body> 36 </html>