Bug 1892041 - Part 1: Update test262 features. r=spidermonkey-reviewers,dminor
[gecko.git] / dom / base / test / test_bug392318.html
blob112468f894cc35de3a23fe5f0695a03915e9ea36
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=392318
5 -->
6 <head>
7 <title>Test for Bug 392318</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 <script class="testbody" type="text/javascript">
11 /** Test for Bug 392318 **/
13 SimpleTest.waitForExplicitFinish();
14 var testRan = false;
16 function runTest() {
17 isnot($("t").offsetWidth, 0, "Unexpected offsetWidth");
18 testRan = true;
21 document.addEventListener("DOMContentLoaded", runTest);
23 addLoadEvent(function() {
24 is(testRan, true, "Onload firing too early");
25 });
27 addLoadEvent(SimpleTest.finish);
28 </script>
29 <!-- IMPORTANT: This sheet must come after the test that sets up the
30 DOMContentLoaded handler and before the <body> -->
31 <link rel="stylesheet" type="text/css" href="data:text/css;%20charset=utf-8,%23t%20%7B%0Awidth%3A%20200px%3B%0Aborder%3A%201px%20solid%20black%3B%0Aheight%3A%20100px%3B%0A%7D">
32 </head>
33 <body>
34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=392318">Mozilla Bug 392318</a>
35 <p id="display"></p>
36 <div id="content" style="display: none">
38 </div>
39 <pre id="test">
40 <div id="t"></div>
41 </pre>
42 </body>
43 </html>