| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../inspector-test.js"></script> | 3 <script src="../inspector-test.js"></script> |
| 4 <script src="../console-test.js"></script> | 4 <script src="../console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function loadScript() | 6 function loadStylesheet() |
| 7 { | 7 { |
| 8 var s = document.createElement("script"); | 8 var s = document.createElement("link"); |
| 9 s.src = "resources/script-as-text.php"; | 9 s.rel = "stylesheet"; |
| 10 s.href = "resources/stylesheet-as-text.php"; |
| 10 document.body.appendChild(s); | 11 document.body.appendChild(s); |
| 11 } | 12 } |
| 12 | |
| 13 function test() | 13 function test() |
| 14 { | 14 { |
| 15 InspectorTest.addConsoleSniffer(step1); | 15 InspectorTest.addConsoleSniffer(step1); |
| 16 InspectorTest.evaluateInPage("loadScript()"); | 16 InspectorTest.evaluateInPage("loadStylesheet()"); |
| 17 | |
| 18 function step1() | 17 function step1() |
| 19 { | 18 { |
| 20 InspectorTest.dumpConsoleMessages(); | 19 InspectorTest.dumpConsoleMessages(); |
| 21 InspectorTest.completeTest(); | 20 InspectorTest.completeTest(); |
| 22 } | 21 } |
| 23 } | 22 } |
| 24 </script> | 23 </script> |
| 25 </head> | 24 </head> |
| 26 <body onload="runTest()"> | 25 <body onload="runTest()"> |
| 27 <p>Tests console message when script is loaded with incorrect text/html mime typ
e.</p> | 26 <p>Tests console message when stylesheet is loaded with incorrect text/html mime
type.</p> |
| 28 <a href="https://bugs.webkit.org/show_bug.cgi?id=69972">Bug 69972</a> | |
| 29 </body> | 27 </body> |
| 30 </html> | 28 </html> |
| OLD | NEW |