OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <template id="template"><span></span></template> | 2 <template id="template"><span></span></template> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 description('Test HTMLTemplateElement content node wrappers have the correct lif
etime.'); | 5 description('Test HTMLTemplateElement content node wrappers have the correct lif
etime.'); |
6 | 6 |
7 if (!window.HTMLTemplateElement) | 7 if (!window.HTMLTemplateElement) |
8 testFailed('This test requires ENABLE(TEMPLATE_TAG)'); | 8 testFailed('This test requires ENABLE(TEMPLATE_TAG)'); |
9 | 9 |
10 var template = document.getElementById('template'); | 10 var template = document.getElementById('template'); |
11 var span = template.content.firstChild; | 11 var span = template.content.firstChild; |
12 shouldBe('span.tagName', '"SPAN"'); | 12 shouldBe('span.tagName', '"SPAN"'); |
13 | 13 |
14 span.expando = 'present'; | 14 span.expando = 'present'; |
15 shouldBe('span.expando', '"present"'); | 15 shouldBe('span.expando', '"present"'); |
16 | 16 |
17 span = undefined; | 17 span = undefined; |
18 gc(); | 18 gc(); |
19 span = template.content.firstChild; | 19 span = template.content.firstChild; |
20 shouldBe('span.tagName', '"SPAN"'); | 20 shouldBe('span.tagName', '"SPAN"'); |
21 shouldBe('span.expando', '"present"'); | 21 shouldBe('span.expando', '"present"'); |
22 </script> | 22 </script> |
OLD | NEW |