OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <select foo="bar"> | 8 <select foo="bar"> |
9 <option name="A">A</option> | 9 <option name="A">A</option> |
10 </select> | 10 </select> |
11 <script> | 11 <script> |
12 | 12 |
13 description("This test verifies that a HTMLCollection protects its base node fro
m being GC'd."); | 13 description("This test verifies that a HTMLCollection protects its base node fro
m being GC'd."); |
14 | 14 |
15 options = document.getElementsByTagName("select")[0].options; | 15 options = document.getElementsByTagName("select")[0].options; |
16 | 16 |
17 document.body.removeChild(document.getElementsByTagName("select")[0]); | 17 document.body.removeChild(document.getElementsByTagName("select")[0]); |
18 | 18 |
19 gc(); | 19 gc(); |
20 | 20 |
21 options[0] = new Option("bik", "bok"); | 21 options[0] = new Option("bik", "bok"); |
22 shouldBe("options[0].parentNode.getAttribute('foo')", "'bar'"); | 22 shouldBe("options[0].parentNode.getAttribute('foo')", "'bar'"); |
23 | 23 |
24 </script> | 24 </script> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |