Index: LayoutTests/inspector/sources/debugger/script-formatter-breakpoints-2.html |
diff --git a/LayoutTests/inspector/sources/debugger/script-formatter-breakpoints.html b/LayoutTests/inspector/sources/debugger/script-formatter-breakpoints-2.html |
similarity index 53% |
rename from LayoutTests/inspector/sources/debugger/script-formatter-breakpoints.html |
rename to LayoutTests/inspector/sources/debugger/script-formatter-breakpoints-2.html |
index e4127b62720e05e0115d277025a60fa526948052..7b040727a8ef5e891ac7dcae3a306fac6aeade11 100644 |
--- a/LayoutTests/inspector/sources/debugger/script-formatter-breakpoints.html |
+++ b/LayoutTests/inspector/sources/debugger/script-formatter-breakpoints-2.html |
@@ -22,50 +22,38 @@ var test = function() |
var formattedSourceFrame; |
InspectorTest.runDebuggerTestSuite([ |
- function testBreakpointsInOriginalAndFormattedSource(next) |
+ function testBreakpointsSetAndRemoveInFormattedSource(next) |
{ |
- InspectorTest.showScriptSource("script-formatter-breakpoints.html", didShowScriptSource); |
+ InspectorTest.showScriptSource("unformatted.js", didShowScriptSource); |
function didShowScriptSource(frame) |
{ |
sourceFrame = frame; |
- InspectorTest.setBreakpoint(sourceFrame, 11, "", true); |
- InspectorTest.waitUntilPaused(pausedInF1); |
- InspectorTest.evaluateInPageWithTimeout("f1()"); |
- } |
- |
- function pausedInF1(callFrames) |
- { |
- InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); |
- InspectorTest.resumeExecution(resumed); |
- } |
- |
- function resumed() |
- { |
InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); |
scriptFormatter._toggleFormatScriptSource(); |
} |
- |
+ |
function uiSourceCodeScriptFormatted() |
{ |
- // There should be a breakpoint in f1 although script is pretty-printed. |
- InspectorTest.waitUntilPaused(pausedInF1Again); |
- InspectorTest.evaluateInPageWithTimeout("f1()"); |
+ formattedSourceFrame = panel.visibleView; |
+ InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); |
+ InspectorTest.waitUntilPaused(pausedInF2); |
+ InspectorTest.evaluateInPageWithTimeout("f2()"); |
} |
- function pausedInF1Again(callFrames) |
+ function pausedInF2(callFrames) |
{ |
InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); |
+ InspectorTest.removeBreakpoint(formattedSourceFrame, 3); |
scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode()); |
InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); |
- InspectorTest.removeBreakpoint(sourceFrame, 11); |
InspectorTest.resumeExecution(next); |
} |
}, |
function testBreakpointSetInOriginalAndRemovedInFormatted(next) |
{ |
- InspectorTest.showScriptSource("script-formatter-breakpoints.html", didShowScriptSource); |
+ InspectorTest.showScriptSource("script-formatter-breakpoints-2.html", didShowScriptSource); |
function didShowScriptSource(frame) |
{ |
@@ -93,64 +81,6 @@ var test = function() |
InspectorTest.assertEquals(breakpoints.length, 0, "There should not be any breakpoints in the storage."); |
next(); |
} |
- }, |
- |
- function testBreakpointsSetAndRemoveInFormattedSource(next) |
- { |
- InspectorTest.showScriptSource("unformatted.js", didShowScriptSource); |
- |
- function didShowScriptSource(frame) |
- { |
- sourceFrame = frame; |
- InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); |
- scriptFormatter._toggleFormatScriptSource(); |
- } |
- |
- function uiSourceCodeScriptFormatted() |
- { |
- formattedSourceFrame = panel.visibleView; |
- InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); |
- InspectorTest.waitUntilPaused(pausedInF2); |
- InspectorTest.evaluateInPageWithTimeout("f2()"); |
- } |
- |
- function pausedInF2(callFrames) |
- { |
- InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); |
- InspectorTest.removeBreakpoint(formattedSourceFrame, 3); |
- scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode()); |
- InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); |
- InspectorTest.resumeExecution(next); |
- } |
- }, |
- |
- function testBreakpointsSetInFormattedAndRemoveInOriginalSource(next) |
- { |
- InspectorTest.showScriptSource("unformatted.js", didShowScriptSource); |
- |
- function didShowScriptSource(frame) |
- { |
- sourceFrame = frame; |
- InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted); |
- scriptFormatter._toggleFormatScriptSource(); |
- } |
- |
- function uiSourceCodeScriptFormatted() |
- { |
- formattedSourceFrame = panel.visibleView; |
- InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); |
- InspectorTest.waitUntilPaused(pausedInF2); |
- InspectorTest.evaluateInPageWithTimeout("f2()"); |
- } |
- |
- function pausedInF2(callFrames) |
- { |
- InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); |
- scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode()); |
- InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); |
- // No need to remove breakpoint since formattedUISourceCode was removed. |
- InspectorTest.resumeExecution(next); |
- } |
} |
]); |