Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / dom / HTMLScriptElement / dont-load-unknown-type.html
1 <div id="console"></div>
2 <script>
3   if (window.testRunner) {
4     testRunner.dumpAsText();
5     testRunner.dumpResourceResponseMIMETypes();
6   }
7
8   function fail(str) {
9     var element = document.createElement("p");
10     element.innerHTML = str;
11     document.getElementById("console").appendChild(element);
12   }
13
14   var bogus_script = document.createElement("script");
15   bogus_script.type = "bogus";
16   bogus_script.src = "shouldnotexecute.js";
17   document.getElementsByTagName("head")[0].appendChild(bogus_script);
18 </script>
19 <script type="fake" src="shouldnotexecute.js"></script>
20 Unknown script types should not be loaded nor executed. If this test fails, an extra line will appear in the output with the script's MIME type.<br>
21 Note: In the current Blink implementation, HTMLPreloadScanner may fetch srcs even though they are invalid. The current HTMLPreloadScanner does not check if the script tag has valid type/language attribute. See crbug.com/329531 for the current status.