| 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/console-test.js"></script> | 4 <script src="../../../http/tests/inspector/console-test.js"></script> |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } | 8 function nonFormattedFunction() { var i = 2 + 2; var a = 4; return a + i; } |
| 9 | 9 |
| 10 function f1() | 10 function f1() |
| 11 { | 11 { |
| 12 console.error("Test message."); | 12 console.error("Test message."); |
| 13 } | 13 } |
| 14 | 14 |
| 15 function onload() | 15 function onload() |
| 16 { | 16 { |
| 17 if (window.testRunner) { | 17 if (window.testRunner) { |
| 18 testRunner.waitUntilDone(); | 18 testRunner.waitUntilDone(); |
| 19 testRunner.showWebInspector(); | 19 testRunner.showWebInspector(); |
| 20 } | 20 } |
| 21 runTest(); | 21 runTest(); |
| 22 } | 22 } |
| 23 | 23 |
| 24 var test = function() | 24 var test = function() |
| 25 { | 25 { |
| 26 var panel = WebInspector.panels.sources; | 26 var panel = UI.panels.sources; |
| 27 var sourceFrame; | 27 var sourceFrame; |
| 28 var scriptFormatter; | 28 var scriptFormatter; |
| 29 | 29 |
| 30 InspectorTest.runDebuggerTestSuite([ | 30 InspectorTest.runDebuggerTestSuite([ |
| 31 function testSetup(next) | 31 function testSetup(next) |
| 32 { | 32 { |
| 33 InspectorTest.scriptFormatter().then(function(sf) { | 33 InspectorTest.scriptFormatter().then(function(sf) { |
| 34 scriptFormatter = sf; | 34 scriptFormatter = sf; |
| 35 next(); | 35 next(); |
| 36 }); | 36 }); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 62 InspectorTest.addResult("Post-format row message list:"); | 62 InspectorTest.addResult("Post-format row message list:"); |
| 63 var formattedSourceFrame = panel.visibleView; | 63 var formattedSourceFrame = panel.visibleView; |
| 64 InspectorTest.addResult(JSON.stringify(Object.keys(formattedSour
ceFrame._rowMessageBuckets))); | 64 InspectorTest.addResult(JSON.stringify(Object.keys(formattedSour
ceFrame._rowMessageBuckets))); |
| 65 next(); | 65 next(); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 ]); | 68 ]); |
| 69 | 69 |
| 70 function dumpConsoleMessageURLs() | 70 function dumpConsoleMessageURLs() |
| 71 { | 71 { |
| 72 var messages = WebInspector.ConsoleView.instance()._visibleViewMessages; | 72 var messages = Console.ConsoleView.instance()._visibleViewMessages; |
| 73 for (var i = 0; i < messages.length; ++i) { | 73 for (var i = 0; i < messages.length; ++i) { |
| 74 var element = messages[i].toMessageElement(); | 74 var element = messages[i].toMessageElement(); |
| 75 var anchor = element.querySelector(".console-message-url"); | 75 var anchor = element.querySelector(".console-message-url"); |
| 76 InspectorTest.addResult(anchor.textContent); | 76 InspectorTest.addResult(anchor.textContent); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 </script> | 81 </script> |
| 82 | 82 |
| 83 </head> | 83 </head> |
| 84 | 84 |
| 85 <body onload="onload()"> | 85 <body onload="onload()"> |
| 86 <p>Tests that the script formatting changes console line numbers. | 86 <p>Tests that the script formatting changes console line numbers. |
| 87 </p> | 87 </p> |
| 88 | 88 |
| 89 </body> | 89 </body> |
| 90 </html> | 90 </html> |
| OLD | NEW |