content/base/test/test_bug416383.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:09d651d0d2c5
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">
15
16 </div>
17 <div id="test_parent"><div someattr="foo"></div></div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
20
21 /** Test for Bug 416383 **/
22
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!")
32
33 }
34
35 SimpleTest.waitForExplicitFinish();
36 addLoadEvent(runTest);
37 addLoadEvent(SimpleTest.finish);
38
39 </script>
40 </pre>
41 </body>
42 </html>
43

mercurial