Commit 4a971bdd authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: Split slow script-formatter-breakpoints.html test into two tests.

BUG=247466
R=apavlov@chromium.org
TBR=apavlov

Review URL: https://codereview.chromium.org/188443004

git-svn-id: svn://svn.chromium.org/blink/trunk@168622 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent fefcae94
...@@ -60,7 +60,6 @@ crbug.com/14885 [ Linux ] fast/js/JSON-stringify.html [ Failure ] ...@@ -60,7 +60,6 @@ crbug.com/14885 [ Linux ] fast/js/JSON-stringify.html [ Failure ]
# These tests flakily timeout on the ASAN bot # These tests flakily timeout on the ASAN bot
crbug.com/247466 [ Linux ] inspector/debugger/live-edit-breakpoints.html [ Pass Timeout ] crbug.com/247466 [ Linux ] inspector/debugger/live-edit-breakpoints.html [ Pass Timeout ]
crbug.com/247466 [ Linux ] inspector/debugger/reveal-not-skipped.html [ Pass Timeout ] crbug.com/247466 [ Linux ] inspector/debugger/reveal-not-skipped.html [ Pass Timeout ]
crbug.com/247466 [ Linux ] inspector/debugger/script-formatter-breakpoints.html [ Pass Timeout ]
crbug.com/247466 [ Linux ] inspector/profiler/heap-snapshot-summary-sorting-fields.html [ Pass Timeout ] crbug.com/247466 [ Linux ] inspector/profiler/heap-snapshot-summary-sorting-fields.html [ Pass Timeout ]
# These have been failing since at least chrome r203901, blink r151723 (no memory errors, just text failure): # These have been failing since at least chrome r203901, blink r151723 (no memory errors, just text failure):
......
...@@ -95,7 +95,6 @@ webkit.org/b/86142 ietestcenter/css3/namespaces/syntax-021.xml [ WontFix ] ...@@ -95,7 +95,6 @@ webkit.org/b/86142 ietestcenter/css3/namespaces/syntax-021.xml [ WontFix ]
crbug.com/247466 [ Win Debug ] inspector/sources/debugger/live-edit-breakpoints.html [ WontFix ] crbug.com/247466 [ Win Debug ] inspector/sources/debugger/live-edit-breakpoints.html [ WontFix ]
crbug.com/247466 [ Debug ] inspector/sources/debugger/dom-breakpoints.html [ WontFix ] crbug.com/247466 [ Debug ] inspector/sources/debugger/dom-breakpoints.html [ WontFix ]
crbug.com/247466 [ Debug ] inspector/sources/debugger/xhr-breakpoints.html [ WontFix ] crbug.com/247466 [ Debug ] inspector/sources/debugger/xhr-breakpoints.html [ WontFix ]
crbug.com/247466 [ Debug ] inspector/sources/debugger/script-formatter-breakpoints.html [ WontFix ]
crbug.com/247466 [ Win Debug ] inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html [ WontFix ] crbug.com/247466 [ Win Debug ] inspector/profiler/heap-snapshot-comparison-expansion-preserved-when-sorting.html [ WontFix ]
crbug.com/247466 [ Debug ] inspector/sources/debugger/set-breakpoint.html [ WontFix ] crbug.com/247466 [ Debug ] inspector/sources/debugger/set-breakpoint.html [ WontFix ]
crbug.com/247466 [ Debug ] inspector/sources/debugger/script-formatter-console.html [ WontFix ] crbug.com/247466 [ Debug ] inspector/sources/debugger/script-formatter-console.html [ WontFix ]
......
...@@ -6,30 +6,15 @@ Running: testBreakpointsInOriginalAndFormattedSource ...@@ -6,30 +6,15 @@ Running: testBreakpointsInOriginalAndFormattedSource
Script execution paused. Script execution paused.
Breakpoint sidebar pane while paused in raw Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints.html:12var f=0; script-formatter-breakpoints-1.html:12var f=0;
Script execution resumed. Script execution resumed.
Script execution paused. Script execution paused.
Breakpoint sidebar pane while paused in pretty printed Breakpoint sidebar pane while paused in pretty printed
script-formatter-breakpoints.html:formatted:17var f = 0; script-formatter-breakpoints-1.html:formatted:17var f = 0;
Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints.html:12var f=0;
Script execution resumed.
Running: testBreakpointSetInOriginalAndRemovedInFormatted
Adding breakpoint.
Formatting.
Removing breakpoint.
Unformatting.
Running: testBreakpointsSetAndRemoveInFormattedSource
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
unformatted.js:formatted:4var b = 1;
Breakpoint sidebar pane while paused in raw Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints-1.html:12var f=0;
Script execution resumed. Script execution resumed.
Running: testBreakpointsSetInFormattedAndRemoveInOriginalSource Running: testBreakpointsSetInFormattedAndRemoveInOriginalSource
......
...@@ -24,7 +24,7 @@ var test = function() ...@@ -24,7 +24,7 @@ var test = function()
InspectorTest.runDebuggerTestSuite([ InspectorTest.runDebuggerTestSuite([
function testBreakpointsInOriginalAndFormattedSource(next) function testBreakpointsInOriginalAndFormattedSource(next)
{ {
InspectorTest.showScriptSource("script-formatter-breakpoints.html", didShowScriptSource); InspectorTest.showScriptSource("script-formatter-breakpoints-1.html", didShowScriptSource);
function didShowScriptSource(frame) function didShowScriptSource(frame)
{ {
...@@ -63,67 +63,6 @@ var test = function() ...@@ -63,67 +63,6 @@ var test = function()
} }
}, },
function testBreakpointSetInOriginalAndRemovedInFormatted(next)
{
InspectorTest.showScriptSource("script-formatter-breakpoints.html", didShowScriptSource);
function didShowScriptSource(frame)
{
sourceFrame = frame;
InspectorTest.addResult("Adding breakpoint.");
InspectorTest.addSniffer(WebInspector.BreakpointManager.Breakpoint.prototype, "_addResolvedLocation", breakpointResolved);
InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
}
function breakpointResolved()
{
InspectorTest.addResult("Formatting.");
InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
scriptFormatter._toggleFormatScriptSource();
}
function uiSourceCodeScriptFormatted()
{
InspectorTest.addResult("Removing breakpoint.");
formattedSourceFrame = panel.visibleView;
InspectorTest.removeBreakpoint(formattedSourceFrame, 16);
InspectorTest.addResult("Unformatting.");
scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode());
var breakpoints = WebInspector.breakpointManager._storage._setting.get();
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) function testBreakpointsSetInFormattedAndRemoveInOriginalSource(next)
{ {
InspectorTest.showScriptSource("unformatted.js", didShowScriptSource); InspectorTest.showScriptSource("unformatted.js", didShowScriptSource);
......
Tests the script formatting is working fine with breakpoints.
Debugger was enabled.
Running: testBreakpointsSetAndRemoveInFormattedSource
Script execution paused.
Breakpoint sidebar pane while paused in pretty printed
unformatted.js:formatted:4var b = 1;
Breakpoint sidebar pane while paused in raw
Script execution resumed.
Running: testBreakpointSetInOriginalAndRemovedInFormatted
Adding breakpoint.
Formatting.
Removing breakpoint.
Unformatting.
Debugger was disabled.
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/debugger-test.js"></script>
<script src="resources/unformatted.js"></script>
<script>
function f1()
{
var a=0;var b=1;var c=3;var d=4;var e=5;
var f=0;
return 0;
}
var test = function()
{
WebInspector.breakpointManager._storage._breakpoints = {};
var panel = WebInspector.showPanel("sources");
var scriptFormatter = InspectorTest.scriptFormatter();
var sourceFrame;
var formattedSourceFrame;
InspectorTest.runDebuggerTestSuite([
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 testBreakpointSetInOriginalAndRemovedInFormatted(next)
{
InspectorTest.showScriptSource("script-formatter-breakpoints-2.html", didShowScriptSource);
function didShowScriptSource(frame)
{
sourceFrame = frame;
InspectorTest.addResult("Adding breakpoint.");
InspectorTest.addSniffer(WebInspector.BreakpointManager.Breakpoint.prototype, "_addResolvedLocation", breakpointResolved);
InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
}
function breakpointResolved()
{
InspectorTest.addResult("Formatting.");
InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
scriptFormatter._toggleFormatScriptSource();
}
function uiSourceCodeScriptFormatted()
{
InspectorTest.addResult("Removing breakpoint.");
formattedSourceFrame = panel.visibleView;
InspectorTest.removeBreakpoint(formattedSourceFrame, 16);
InspectorTest.addResult("Unformatting.");
scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode());
var breakpoints = WebInspector.breakpointManager._storage._setting.get();
InspectorTest.assertEquals(breakpoints.length, 0, "There should not be any breakpoints in the storage.");
next();
}
}
]);
}
</script>
</head>
<body onload="runTest()">
<p>Tests the script formatting is working fine with breakpoints.
</p>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment