| 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 | 5 |
| 6 <script> | 6 <script> |
| 7 function test() | 7 function test() |
| 8 { | 8 { |
| 9 var scripts = []; | 9 var scripts = []; |
| 10 InspectorTest.startDebuggerTest(step1); | 10 InspectorTest.startDebuggerTest(step1); |
| 11 | 11 |
| 12 function step1() | 12 function step1() |
| 13 { | 13 { |
| 14 InspectorTest.queryScripts(function(script) { step2({ data: script }) })
; | 14 InspectorTest.queryScripts(function(script) { step2({ data: script }) })
; |
| 15 WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.E
vents.ParsedScriptSource, step2); | 15 InspectorTest.debuggerModel.addEventListener(WebInspector.DebuggerModel.
Events.ParsedScriptSource, step2); |
| 16 } | 16 } |
| 17 | 17 |
| 18 function step2(event) | 18 function step2(event) |
| 19 { | 19 { |
| 20 var script = event.data; | 20 var script = event.data; |
| 21 if (script.sourceURL !== WebInspector.resourceTreeModel.inspectedPageURL
()) | 21 if (script.sourceURL !== InspectorTest.resourceTreeModel.inspectedPageUR
L()) |
| 22 return; | 22 return; |
| 23 scripts.push(script); | 23 scripts.push(script); |
| 24 if (scripts.length === 6) | 24 if (scripts.length === 6) |
| 25 step3(); | 25 step3(); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function step3() | 28 function step3() |
| 29 { | 29 { |
| 30 scripts.sort(function(x, y) { return x.lineOffset - y.lineOffset }); | 30 scripts.sort(function(x, y) { return x.lineOffset - y.lineOffset }); |
| 31 for (var i = 0; i < scripts.length; ++i) { | 31 for (var i = 0; i < scripts.length; ++i) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 50 | 50 |
| 51 </head> | 51 </head> |
| 52 <body onload="window.dummy = function() { }; runTest()"> | 52 <body onload="window.dummy = function() { }; runTest()"> |
| 53 <p> | 53 <p> |
| 54 Tests that valid parsed script notifications are received by front-end. | 54 Tests that valid parsed script notifications are received by front-end. |
| 55 <a href="https://bugs.webkit.org/show_bug.cgi?id=52721">Bug 52721</a> | 55 <a href="https://bugs.webkit.org/show_bug.cgi?id=52721">Bug 52721</a> |
| 56 </p> | 56 </p> |
| 57 </body> | 57 </body> |
| 58 | 58 |
| 59 </html> | 59 </html> |
| OLD | NEW |