content/html/document/test/test_bug486741.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

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=486741
     5 -->
     6 <head>
     7   <title>Test for Bug 486741</title>
     8   <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
     9   <script type="application/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=486741">Mozilla Bug 486741</a>
    14 <p id="display"><iframe id="f"></iframe></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** Test for Bug 486741 **/
    22 SimpleTest.waitForExplicitFinish();
    23 addLoadEvent(function() {
    24   var d = $("f").contentDocument;
    25   var root = d.documentElement;
    26   is(root.tagName, "HTML", "Unexpected root");
    28   d.open();
    29   isnot(d.documentElement, root, "Shouldn't have the old root element");
    31   d.write("Test");
    32   d.close();
    34   isnot(d.documentElement, root, "Still shouldn't have the old root element");
    35   is(d.documentElement.tagName, "HTML", "Unexpected new root after write");
    37   SimpleTest.finish();
    38 });
    40 </script>
    41 </pre>
    42 </body>
    43 </html>

mercurial