| 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 src="../debugger/resources/unformatted3.js"></script> | 5 <script src="../debugger/resources/unformatted3.js"></script> |
| 6 <script> | 6 <script> |
| 7 var test = function() | 7 var test = function() |
| 8 { | 8 { |
| 9 Bindings.breakpointManager._storage._breakpoints = {}; | 9 Bindings.breakpointManager._storage._breakpoints = {}; |
| 10 var panel = UI.panels.sources; | 10 var panel = UI.panels.sources; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 function didShowScriptSource(frame) | 26 function didShowScriptSource(frame) |
| 27 { | 27 { |
| 28 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro
totype, "_updateButton", uiSourceCodeScriptFormatted); | 28 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro
totype, "_updateButton", uiSourceCodeScriptFormatted); |
| 29 scriptFormatter._toggleFormatScriptSource(); | 29 scriptFormatter._toggleFormatScriptSource(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 function uiSourceCodeScriptFormatted() | 32 function uiSourceCodeScriptFormatted() |
| 33 { | 33 { |
| 34 var formattedSourceFrame = panel.visibleView; | 34 var formattedSourceFrame = panel.visibleView; |
| 35 InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); | 35 InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); |
| 36 InspectorTest.waitBreakpointSidebarPane().then(evaluateF2); |
| 37 } |
| 38 |
| 39 function evaluateF2() { |
| 36 InspectorTest.waitUntilPaused(pausedInF2); | 40 InspectorTest.waitUntilPaused(pausedInF2); |
| 37 InspectorTest.evaluateInPageWithTimeout("f2()"); | 41 InspectorTest.evaluateInPageWithTimeout("f2()"); |
| 38 } | 42 } |
| 39 | 43 |
| 44 |
| 40 function pausedInF2(callFrames) | 45 function pausedInF2(callFrames) |
| 41 { | 46 { |
| 42 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty
printed"); | 47 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty
printed"); |
| 48 InspectorTest.waitBreakpointSidebarPane() |
| 49 .then(() => InspectorTest.dumpBreakpointSidebarPane("while p
aused in raw")) |
| 50 .then(() => InspectorTest.resumeExecution(next)); |
| 51 // No need to remove breakpoint since formattedUISourceCode was
removed. |
| 43 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl
eView.uiSourceCode()); | 52 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl
eView.uiSourceCode()); |
| 44 InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); | |
| 45 // No need to remove breakpoint since formattedUISourceCode was
removed. | |
| 46 InspectorTest.resumeExecution(next); | |
| 47 } | 53 } |
| 48 } | 54 } |
| 49 ]); | 55 ]); |
| 50 | 56 |
| 51 } | 57 } |
| 52 </script> | 58 </script> |
| 53 </head> | 59 </head> |
| 54 <body onload="runTest()"> | 60 <body onload="runTest()"> |
| 55 <p>Tests the script formatting is working fine with breakpoints. | 61 <p>Tests the script formatting is working fine with breakpoints. |
| 56 </p> | 62 </p> |
| 57 </body> | 63 </body> |
| 58 </html> | 64 </html> |
| OLD | NEW |