Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=461555
5 -->
6 <head>
7 <title>Test for Bug 461555</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=461555">Mozilla Bug 461555</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <script>
19 SimpleTest.waitForExplicitFinish();
21 function writeIt(n) {
22 document.write("<span>" + n + "</span>");
23 }
25 function done() {
26 nodes = document.getElementsByTagName('span');
27 is(nodes.length, 3, "wrong length");
28 for (i = 0; i < nodes.length; ++i) {
29 is(nodes[i].textContent, i+1, "wrong order");
30 }
31 SimpleTest.finish();
32 }
34 document.addEventListener("DOMContentLoaded", function() {
35 done();
36 }, false);
38 writeIt(1);
40 </script>
41 <script defer>
42 writeIt(2);
43 </script>
44 <script>
45 writeIt(3);
46 </script>