OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <script> | 7 <script> |
8 description("This test ensures that title elements in a shadow subtree do not af
fect document.title attribute.") | 8 description("This test ensures that title elements in a shadow subtree do not af
fect document.title attribute.") |
9 | 9 |
10 debug('create a title element and insert it to document.'); | 10 debug('create a title element and insert it to document.'); |
11 var title = document.createElement('title'); | 11 var title = document.createElement('title'); |
12 title.appendChild(document.createTextNode('document title')); | 12 title.appendChild(document.createTextNode('document title')); |
13 document.head.appendChild(title); | 13 document.head.appendChild(title); |
14 shouldBe('document.title', '"document title"'); | 14 shouldBe('document.title', '"document title"'); |
(...skipping 20 matching lines...) Expand all Loading... |
35 shadow2.innerHTML = '<title>shadow title2</title>'; | 35 shadow2.innerHTML = '<title>shadow title2</title>'; |
36 document.head.appendChild(subtree2); | 36 document.head.appendChild(subtree2); |
37 shouldBe('document.title', '""'); | 37 shouldBe('document.title', '""'); |
38 debug('remove the subtree from document'); | 38 debug('remove the subtree from document'); |
39 document.head.removeChild(subtree2); | 39 document.head.removeChild(subtree2); |
40 shouldBe('document.title', '""'); | 40 shouldBe('document.title', '""'); |
41 | 41 |
42 </script> | 42 </script> |
43 </body> | 43 </body> |
44 </html> | 44 </html> |
OLD | NEW |