| 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>// It is important that script starts on line 5 (zero-based 4) | 5 <script>// It is important that script starts on line 5 (zero-based 4) |
| 6 | 6 |
| 7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } | 7 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } |
| 8 | 8 |
| 9 function dummyScript() | 9 function dummyScript() |
| 10 { | 10 { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 InspectorTest.startDebuggerTest(waitForScripts); | 36 InspectorTest.startDebuggerTest(waitForScripts); |
| 37 } | 37 } |
| 38 | 38 |
| 39 function waitForScripts() | 39 function waitForScripts() |
| 40 { | 40 { |
| 41 InspectorTest.showScriptSource("linkifier.html", debuggerTest); | 41 InspectorTest.showScriptSource("linkifier.html", debuggerTest); |
| 42 } | 42 } |
| 43 | 43 |
| 44 function debuggerTest() | 44 function debuggerTest() |
| 45 { | 45 { |
| 46 var scripts = InspectorTest.debuggerModel.scripts; | 46 for (var scriptCandidate of InspectorTest.debuggerModel.scripts()) { |
| 47 for (var scriptId in scripts) { | |
| 48 var scriptCandidate = scripts[scriptId]; | |
| 49 if (scriptCandidate.sourceURL === InspectorTest.mainTarget.inspected
URL() && scriptCandidate.lineOffset === 4) { | 47 if (scriptCandidate.sourceURL === InspectorTest.mainTarget.inspected
URL() && scriptCandidate.lineOffset === 4) { |
| 50 script = scriptCandidate; | 48 script = scriptCandidate; |
| 51 break; | 49 break; |
| 52 } | 50 } |
| 53 } | 51 } |
| 54 | 52 |
| 55 uiSourceCode = Workspace.workspace.uiSourceCodeForURL(InspectorTest.main
Target.inspectedURL()); | 53 uiSourceCode = Workspace.workspace.uiSourceCodeForURL(InspectorTest.main
Target.inspectedURL()); |
| 56 var linkifyMe = "at triggerError (http://localhost/show/:22:11)"; | 54 var linkifyMe = "at triggerError (http://localhost/show/:22:11)"; |
| 57 var fragment = Components.linkifyStringAsFragment(linkifyMe); | 55 var fragment = Components.linkifyStringAsFragment(linkifyMe); |
| 58 var anchor = fragment.querySelector('.devtools-link'); | 56 var anchor = fragment.querySelector('.devtools-link'); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 </script> | 95 </script> |
| 98 </head> | 96 </head> |
| 99 | 97 |
| 100 <body onload="onload()"> | 98 <body onload="onload()"> |
| 101 <p> | 99 <p> |
| 102 Tests that Linkifier works correctly. | 100 Tests that Linkifier works correctly. |
| 103 <p> | 101 <p> |
| 104 | 102 |
| 105 </body> | 103 </body> |
| 106 </html> | 104 </html> |
| OLD | NEW |