| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 var script = document.createElement("script"); | 47 var script = document.createElement("script"); |
| 48 script.src = "../debugger/resources/script-with-poor-url.js"; | 48 script.src = "../debugger/resources/script-with-poor-url.js"; |
| 49 document.head.appendChild(script); | 49 document.head.appendChild(script); |
| 50 } | 50 } |
| 51 | 51 |
| 52 function test() | 52 function test() |
| 53 | 53 |
| 54 { | 54 { |
| 55 function forEachScriptMatchingURL(url, handler) | 55 function forEachScriptMatchingURL(url, handler) |
| 56 { | 56 { |
| 57 var scripts = InspectorTest.debuggerModel._scripts; | 57 for (var script of InspectorTest.debuggerModel.scripts()) { |
| 58 for (var id in scripts) { | 58 if (script.sourceURL.indexOf(url) !== -1) |
| 59 if (scripts[id].sourceURL.indexOf(url) !== -1) | 59 handler(script); |
| 60 handler(scripts[id]); | |
| 61 } | 60 } |
| 62 } | 61 } |
| 63 | 62 |
| 64 InspectorTest.runDebuggerTestSuite([ | 63 InspectorTest.runDebuggerTestSuite([ |
| 65 function testSourceURLCommentInInlineScript(next) | 64 function testSourceURLCommentInInlineScript(next) |
| 66 { | 65 { |
| 67 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); | 66 InspectorTest.showScriptSource("source-url-comment.html", didShowScr
iptSource); |
| 68 | 67 |
| 69 function didShowScriptSource(sourceFrame) | 68 function didShowScriptSource(sourceFrame) |
| 70 { | 69 { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 }; | 189 }; |
| 191 | 190 |
| 192 </script> | 191 </script> |
| 193 | 192 |
| 194 </head> | 193 </head> |
| 195 | 194 |
| 196 <body onload="runTest()"> | 195 <body onload="runTest()"> |
| 197 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p> | 196 <p>Tests that evals with sourceURL comment are shown in scripts panel.</p> |
| 198 </body> | 197 </body> |
| 199 </html> | 198 </html> |
| OLD | NEW |