content/base/test/test_bug431833.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/content/base/test/test_bug431833.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=431833
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 431833</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>
    1.14 +    var loadsComplete = [];
    1.15 +    function test(e) {
    1.16 +      loadsComplete[e.target.id] = true;
    1.17 +    }
    1.18 +    window.addEventListener('DOMFrameContentLoaded',test,true);
    1.19 +  </script>
    1.20 +</head>
    1.21 +<body>
    1.22 +
    1.23 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=431833">Mozilla Bug 431833</a>
    1.24 +<p id="display">
    1.25 + <iframe id="f1" src="data:text/html,1"></iframe>
    1.26 + <iframe id="f2" src="data:text/html,2"></iframe>
    1.27 + <iframe id="f3" src="data:text/html,<iframe id='f4' src='data:text/html,3'></iframe>"></iframe>
    1.28 +</p>
    1.29 +<div id="content" style="display: none">
    1.30 +  
    1.31 +</div>
    1.32 +<pre id="test">
    1.33 +<script class="testbody" type="text/javascript">
    1.34 +
    1.35 +/** Test for Bug 431833 **/
    1.36 +
    1.37 +SimpleTest.waitForExplicitFinish();
    1.38 +
    1.39 +addLoadEvent(function() {
    1.40 +    function check(id) {
    1.41 +      ok(loadsComplete[id], "DOMFrameContentLoaded didn't fire for " + id);
    1.42 +    }
    1.43 +    check("f1");
    1.44 +    check("f2");
    1.45 +    check("f3");
    1.46 +    check("f4");
    1.47 +  });
    1.48 +
    1.49 +addLoadEvent(SimpleTest.finish);
    1.50 +</script>
    1.51 +</pre>
    1.52 +</body>
    1.53 +</html>
    1.54 +

mercurial