| 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 | 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 f1() | 9 function f1() |
| 10 { | 10 { |
| 11 console.error("Test message."); | 11 console.error("Test message."); |
| 12 } | 12 } |
| 13 | 13 |
| 14 function onload() | |
| 15 { | |
| 16 if (window.testRunner) { | |
| 17 testRunner.waitUntilDone(); | |
| 18 testRunner.showWebInspector(); | |
| 19 } | |
| 20 runTest(); | |
| 21 } | |
| 22 | |
| 23 var test = function() | 14 var test = function() |
| 24 { | 15 { |
| 25 var panel = WebInspector.inspectorView.showPanel("sources"); | 16 var panel = WebInspector.inspectorView.showPanel("sources"); |
| 26 var worker = new Worker("ScriptFormatterWorker.js"); | 17 var worker = new Worker("ScriptFormatterWorker.js"); |
| 27 var sourceFrame; | 18 var sourceFrame; |
| 28 var scriptFormatter = InspectorTest.scriptFormatter(); | 19 var scriptFormatter = InspectorTest.scriptFormatter(); |
| 29 | 20 |
| 30 InspectorTest.runDebuggerTestSuite([ | 21 InspectorTest.runDebuggerTestSuite([ |
| 31 function testConsoleMessagesForFormattedScripts(next) | 22 function testConsoleMessagesForFormattedScripts(next) |
| 32 { | 23 { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 var anchor = element.querySelector(".console-message-url"); | 60 var anchor = element.querySelector(".console-message-url"); |
| 70 InspectorTest.addResult(anchor.textContent); | 61 InspectorTest.addResult(anchor.textContent); |
| 71 } | 62 } |
| 72 } | 63 } |
| 73 } | 64 } |
| 74 | 65 |
| 75 </script> | 66 </script> |
| 76 | 67 |
| 77 </head> | 68 </head> |
| 78 | 69 |
| 79 <body onload="onload()"> | 70 <body onload="runTest()"> |
| 80 <p>Tests that the script formatting changes console line numbers. | 71 <p>Tests that the script formatting changes console line numbers. |
| 81 </p> | 72 </p> |
| 82 | 73 |
| 83 </body> | 74 </body> |
| 84 </html> | 75 </html> |
| OLD | NEW |