| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 4 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function keepAliveInInlineScript() { } | 6 function keepAliveInInlineScript() { } |
| 7 | 7 |
| 8 //# sourceURL=inlineScriptURL.js | 8 //# sourceURL=inlineScriptURL.js |
| 9 </script> | 9 </script> |
| 10 <script> | 10 <script> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 } | 62 } |
| 63 | 63 |
| 64 InspectorTest.runDebuggerTestSuite([ | 64 InspectorTest.runDebuggerTestSuite([ |
| 65 function testSourceURLCommentInInlineScript(next) | 65 function testSourceURLCommentInInlineScript(next) |
| 66 { | 66 { |
| 67 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); | 67 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); |
| 68 | 68 |
| 69 function didShowScriptSource(sourceFrame) | 69 function didShowScriptSource(sourceFrame) |
| 70 { | 70 { |
| 71 var panel = WebInspector.panels.sources; | 71 var panel = UI.panels.sources; |
| 72 var uiSourceCodes = panel._workspace.uiSourceCodes(); | 72 var uiSourceCodes = panel._workspace.uiSourceCodes(); |
| 73 var ignored = true; | 73 var ignored = true; |
| 74 for (var i = 0; i < uiSourceCodes.length && ignored; ++i) { | 74 for (var i = 0; i < uiSourceCodes.length && ignored; ++i) { |
| 75 if (uiSourceCodes[i].url().indexOf("inlineScriptURL.js") !==
-1) | 75 if (uiSourceCodes[i].url().indexOf("inlineScriptURL.js") !==
-1) |
| 76 ignored = false; | 76 ignored = false; |
| 77 } | 77 } |
| 78 if (ignored) | 78 if (ignored) |
| 79 InspectorTest.addResult("FAILED: sourceURL comment in inline
script was ignored"); | 79 InspectorTest.addResult("FAILED: sourceURL comment in inline
script was ignored"); |
| 80 next(); | 80 next(); |
| 81 } | 81 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 94 } | 94 } |
| 95 }, | 95 }, |
| 96 | 96 |
| 97 function testPoorSourceURLCommentInScript(next) | 97 function testPoorSourceURLCommentInScript(next) |
| 98 { | 98 { |
| 99 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); | 99 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); |
| 100 InspectorTest.evaluateInPage("setTimeout(addScriptWithPoorURL, 0)"); | 100 InspectorTest.evaluateInPage("setTimeout(addScriptWithPoorURL, 0)"); |
| 101 | 101 |
| 102 function didShowScriptSource(sourceFrame) | 102 function didShowScriptSource(sourceFrame) |
| 103 { | 103 { |
| 104 var panel = WebInspector.panels.sources; | 104 var panel = UI.panels.sources; |
| 105 var uiSourceCodes = panel._workspace.uiSourceCodes(); | 105 var uiSourceCodes = panel._workspace.uiSourceCodes(); |
| 106 for (var i = 0; i < uiSourceCodes.length; ++i) { | 106 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 107 if (uiSourceCodes[i].url().indexOf("scriptWithPoorSourceURL.
js") !== -1) | 107 if (uiSourceCodes[i].url().indexOf("scriptWithPoorSourceURL.
js") !== -1) |
| 108 InspectorTest.addResult("FAILED: poor sourceURL comment
in script was used as a script name"); | 108 InspectorTest.addResult("FAILED: poor sourceURL comment
in script was used as a script name"); |
| 109 } | 109 } |
| 110 next(); | 110 next(); |
| 111 } | 111 } |
| 112 }, | 112 }, |
| 113 | 113 |
| 114 function testSourceURLComment(next) | 114 function testSourceURLComment(next) |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 </script> | 192 </script> |
| 193 | 193 |
| 194 </head> | 194 </head> |
| 195 | 195 |
| 196 <body onload="runTest()"> | 196 <body onload="runTest()"> |
| 197 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p> | 197 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p> |
| 198 </body> | 198 </body> |
| 199 </html> | 199 </html> |
| OLD | NEW |