OLD | NEW |
1 <div id="console"></div> | 1 <div id="console"></div> |
2 <script> | 2 <script> |
3 if (window.testRunner) { | 3 if (window.testRunner) { |
4 testRunner.dumpAsText(); | 4 testRunner.dumpAsText(); |
5 testRunner.dumpResourceResponseMIMETypes(); | 5 testRunner.dumpResourceResponseMIMETypes(); |
6 } | 6 } |
7 | 7 |
8 function fail(str) { | 8 function fail(str) { |
9 var element = document.createElement("p"); | 9 var element = document.createElement("p"); |
10 element.innerHTML = str; | 10 element.innerHTML = str; |
11 document.getElementById("console").appendChild(element); | 11 document.getElementById("console").appendChild(element); |
12 } | 12 } |
13 | 13 |
14 var bogus_script = document.createElement("script"); | 14 var bogus_script = document.createElement("script"); |
15 bogus_script.type = "bogus"; | 15 bogus_script.type = "bogus"; |
16 bogus_script.src = "shouldnotexecute.js"; | 16 bogus_script.src = "shouldnotexecute.js"; |
17 document.getElementsByTagName("head")[0].appendChild(bogus_script); | 17 document.getElementsByTagName("head")[0].appendChild(bogus_script); |
18 </script> | 18 </script> |
19 <script type="fake" src="shouldnotexecute.js"></script> | 19 <script type="fake" src="shouldnotexecute.js"></script> |
20 Unknown script types should not be loaded nor executed. If this test fails, an e
xtra line will appear in the output with the script's MIME type. | 20 Unknown script types should not be loaded nor executed. If this test fails, an m
ore than one line will appear in the output with the script's MIME type. One lin
e is OK, as it's from the prelaoder (which has no concept of invalid script type
s and will happily issue a preload). |
OLD | NEW |