| 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 test() | 6 function test() |
| 7 { | 7 { |
| 8 var script; | 8 var script; |
| 9 | 9 |
| 10 InspectorTest.startDebuggerTest(waitForScripts); | 10 InspectorTest.startDebuggerTest(waitForScripts); |
| 11 | 11 |
| 12 function waitForScripts() | 12 function waitForScripts() |
| 13 { | 13 { |
| 14 InspectorTest.showScriptSource("linkifier.html", debuggerTest); | 14 InspectorTest.showScriptSource("linkifier.html", debuggerTest); |
| 15 } | 15 } |
| 16 | 16 |
| 17 function debuggerTest() | 17 function debuggerTest() |
| 18 { | 18 { |
| 19 var target = SDK.targetManager.mainTarget(); | 19 var target = SDK.targetManager.mainTarget(); |
| 20 var url = target.inspectedURL(); | 20 var url = target.inspectedURL(); |
| 21 var scripts = InspectorTest.debuggerModel.scripts; | 21 for (var scriptCandidate of InspectorTest.debuggerModel.scripts()) { |
| 22 for (var scriptId in scripts) { | |
| 23 var scriptCandidate = scripts[scriptId]; | |
| 24 if (scriptCandidate.sourceURL === url) { | 22 if (scriptCandidate.sourceURL === url) { |
| 25 script = scriptCandidate; | 23 script = scriptCandidate; |
| 26 break; | 24 break; |
| 27 } | 25 } |
| 28 } | 26 } |
| 29 | 27 |
| 30 dumpLiveLocationsCount(); | 28 dumpLiveLocationsCount(); |
| 31 | 29 |
| 32 var linkifier = new Components.Linkifier(); | 30 var linkifier = new Components.Linkifier(); |
| 33 InspectorTest.addResult("Created linkifier"); | 31 InspectorTest.addResult("Created linkifier"); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 </script> | 69 </script> |
| 72 </head> | 70 </head> |
| 73 | 71 |
| 74 <body onload="runTest()"> | 72 <body onload="runTest()"> |
| 75 <p> | 73 <p> |
| 76 Tests that Linkifier works correctly. | 74 Tests that Linkifier works correctly. |
| 77 <p> | 75 <p> |
| 78 | 76 |
| 79 </body> | 77 </body> |
| 80 </html> | 78 </html> |
| OLD | NEW |