content/base/test/test_bug416383.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=416383
     5 -->
     6 <head>
     7   <title>Test for Bug 416383</title>
     8   <script type="text/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=416383">Mozilla Bug 416383</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    16 </div>
    17 <div id="test_parent"><div someattr="foo"></div></div>
    18 <pre id="test">
    19 <script class="testbody" type="text/javascript">
    21 /** Test for Bug 416383 **/
    23 function runTest() {
    24   var testParent = document.getElementById("test_parent");
    25   var attrs = testParent.firstChild.attributes;
    26   ok(attrs != null, "Element should have attributes!");
    27   var attr = testParent.firstChild.getAttributeNode("someattr");
    28   ok(attr.value == "foo", "The value of the attribute should be 'foo'!");
    29   testParent.removeChild(testParent.firstChild);
    30   SpecialPowers.gc();
    31   ok(true, "Browser should not crash!")
    33 }
    35 SimpleTest.waitForExplicitFinish();
    36 addLoadEvent(runTest);
    37 addLoadEvent(SimpleTest.finish);
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial