OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
4 <script> | 4 <script> |
5 var testVal = 'script has not run'; | 5 var testVal = 'script has not run'; |
6 </script> | 6 </script> |
7 <!-- FIXME: Add non-flaky test for <img> tags --> | 7 <!-- FIXME: Add non-flaky test for <img> tags --> |
8 <template><script>window.testVal = 'script has run';</script></template> | 8 <template><script>window.testVal = 'script has run';</script></template> |
9 <script> | 9 <script> |
10 description('The test asserts that elements within template contents are "inert"
, e.g. script does not run.'); | 10 description('The test asserts that elements within template contents are "inert"
, e.g. script does not run.'); |
11 shouldBeEqualToString('testVal', 'script has not run'); | 11 shouldBeEqualToString('testVal', 'script has not run'); |
12 var templateContent = document.querySelector('template').content; | 12 var templateContent = document.querySelector('template').content; |
13 document.body.appendChild(templateContent); | 13 document.body.appendChild(templateContent); |
14 shouldBeEqualToString('testVal', 'script has run'); | 14 shouldBeEqualToString('testVal', 'script has run'); |
15 </script> | 15 </script> |
16 <script src="../../js/resources/js-test-post.js"></script> | |
17 </body> | 16 </body> |
OLD | NEW |