content/base/test/test_bug392318.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug392318.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=392318
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 392318</title>
    1.11 +  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    1.13 +  <script class="testbody" type="text/javascript">
    1.14 +  /** Test for Bug 392318 **/
    1.15 +  
    1.16 +  SimpleTest.waitForExplicitFinish();
    1.17 +  var testRan = false;
    1.18 +  
    1.19 +  function runTest() {
    1.20 +    isnot($("t").offsetWidth, 0, "Unexpected offsetWidth");
    1.21 +    testRan = true;
    1.22 +  }
    1.23 +  
    1.24 +  document.addEventListener("DOMContentLoaded", runTest, false);
    1.25 +  
    1.26 +  addLoadEvent(function() {
    1.27 +    is(testRan, true, "Onload firing too early");
    1.28 +  });
    1.29 +  
    1.30 +  addLoadEvent(SimpleTest.finish);
    1.31 +  </script>
    1.32 +  <!-- IMPORTANT: This sheet must come after the test that sets up the
    1.33 +       DOMContentLoaded handler and before the <body> -->
    1.34 +  <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">
    1.35 +</head>
    1.36 +<body>
    1.37 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=392318">Mozilla Bug 392318</a>
    1.38 +<p id="display"></p>
    1.39 +<div id="content" style="display: none">
    1.40 +  
    1.41 +</div>
    1.42 +<pre id="test">
    1.43 +<div id="t"></div>
    1.44 +</pre>
    1.45 +</body>
    1.46 +</html>
    1.47 +

mercurial