OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../../resources/js-test.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 jsTestIsAsync = true; | 6 jsTestIsAsync = true; |
7 | 7 |
8 description('Test basic usage of document.currentScript') | 8 description('Test basic usage of document.currentScript') |
9 | 9 |
10 function logCurrentScript() { | 10 function logCurrentScript() { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 var script = document.createElement('script'); | 55 var script = document.createElement('script'); |
56 script.id = 'j'; | 56 script.id = 'j'; |
57 script.textContent = 'logCurrentScript();'; | 57 script.textContent = 'logCurrentScript();'; |
58 script.async = false; | 58 script.async = false; |
59 script.defer = false; | 59 script.defer = false; |
60 document.head.appendChild(script); | 60 document.head.appendChild(script); |
61 | 61 |
62 logCurrentScript(); | 62 logCurrentScript(); |
63 </script> | 63 </script> |
64 | 64 |
| 65 <script id="svg_in_html"> |
| 66 logCurrentScript(); |
| 67 |
| 68 var svg = document.createElementNS("htttp://www.w3.org/2000/svg", "svg"); |
| 69 var script = document.createElementNS("http://www.w3.org/2000/svg", "script"); |
| 70 script.id = "svg script"; |
| 71 script.textContent = 'logCurrentScript();'; |
| 72 svg.appendChild(script); |
| 73 document.head.appendChild(script); |
| 74 </script> |
| 75 |
65 <script> | 76 <script> |
66 window.onload = function() { | 77 window.onload = function() { |
67 shouldBeNull('document.currentScript'); | 78 shouldBeNull('document.currentScript'); |
68 finishJSTest(); | 79 finishJSTest(); |
69 }; | 80 }; |
70 </script> | 81 </script> |
71 </body> | 82 </body> |
72 </html> | 83 </html> |
73 | 84 |
OLD | NEW |