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=548828
5 -->
6 <head>
7 <title>Test for Bug 548828</title>
8 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=548828">Mozilla Bug 548828</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
21 /** Test for Bug 548828 **/
22 var head = document.getElementsByTagName("head")[0];
23 is(document.head, head, "document.head and document.getElementsByTagName(\"head\")[0] should match");
24 document.head = "";
25 is(document.head, head, "document.head reassigned");
26 document.head = document.createElement("head");
27 is(document.head, head, "new element created with the name \"head\"");
28 document.documentElement.appendChild(document.createElement("head"));
29 is(document.head, head, "new child named head appended to document");
30 var head2 = document.createElement("head");
31 document.documentElement.insertBefore(head2, head);
32 is(document.head, head2, "new head inserted before existing head");
34 </script>
35 </pre>
36 </body>
37 </html>