| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <link rel="stylesheet" href="../js/resources/js-test-style.css"> | 2 <link rel="stylesheet" href="../js/resources/js-test-style.css"> |
| 3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../js/resources/js-test-pre.js"></script> |
| 4 <body> | 4 <body> |
| 5 <script> | 5 <script> |
| 6 description('Tests that attribute node wrappers are not prematurely garbage coll
ected'); | 6 description('Tests that attribute node wrappers are not prematurely garbage coll
ected'); |
| 7 | 7 |
| 8 var e = document.createElement('div'); | 8 var e = document.createElement('div'); |
| 9 document.body.appendChild(e); | 9 document.body.appendChild(e); |
| 10 e.setAttribute('id', 'd'); | 10 e.setAttribute('id', 'd'); |
| 11 e.setAttribute('foo', 'bar'); | 11 e.setAttribute('foo', 'bar'); |
| 12 a = e.getAttributeNode('foo'); | 12 a = e.getAttributeNode('foo'); |
| 13 a.prop = 'set'; | 13 a.prop = 'set'; |
| 14 shouldBe('a.prop', '"set"'); | 14 shouldBe('a.prop', '"set"'); |
| 15 | 15 |
| 16 a = null; | 16 a = null; |
| 17 e = null; | 17 e = null; |
| 18 gc(); | 18 gc(); |
| 19 | 19 |
| 20 e = document.body.querySelector('div#d'); | 20 e = document.body.querySelector('div#d'); |
| 21 a = e.getAttributeNode('foo'); | 21 a = e.getAttributeNode('foo'); |
| 22 shouldBe('a.prop', '"set"'); | 22 shouldBe('a.prop', '"set"'); |
| 23 | 23 |
| 24 successfullyParsed = true; | 24 successfullyParsed = true; |
| 25 </script> | 25 </script> |
| 26 <script src="../js/resources/js-test-post.js"></script> | |
| OLD | NEW |