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