Commit 1ec48ab6 authored by vsevik@chromium.org's avatar vsevik@chromium.org

DevTools: split slow formatter breakpoints tests

NOTRY=true
TBR=vsevik
BUG=357004

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

git-svn-id: svn://svn.chromium.org/blink/trunk@170158 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 6bfc525a
......@@ -936,7 +936,6 @@ crbug.com/356996 [ Mac Release ] html5lib/generated/run-tests1-data.html [ Pass
crbug.com/356997 http/tests/security/isolatedWorld/events.html [ Failure Pass ]
crbug.com/357002 [ Linux ] http/tests/misc/cache-hit-resource-timing-buffer-full-crash.html [ Failure Pass ]
crbug.com/357003 [ Linux Release ] inspector/elements/styles/stylesheet-source-url-comment.html [ Pass Timeout ]
crbug.com/357004 [ Linux Mac Release ] inspector/sources/debugger/script-formatter-breakpoints-2.html [ Pass Timeout ]
crbug.com/357068 css3/images/cross-fade-invalidation.html [ ImageOnlyFailure Pass ]
crbug.com/357069 [ Debug ] fast/media/lifetime.html [ Crash Pass Timeout ]
crbug.com/357071 gamepad/gamepad-polling-access.html [ Crash Pass ]
......
......@@ -16,14 +16,5 @@ Breakpoint sidebar pane while paused in raw
script-formatter-breakpoints-1.html:12var f=0;
Script execution resumed.
Running: testBreakpointsSetInFormattedAndRemoveInOriginalSource
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.
Debugger was disabled.
......@@ -61,47 +61,14 @@ var test = function()
InspectorTest.removeBreakpoint(sourceFrame, 11);
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);
}
}
]);
}
</script>
</head>
<body onload="runTest()">
<p>Tests the script formatting is working fine with breakpoints.
</p>
</body>
</html>
......@@ -10,11 +10,5 @@ Breakpoint sidebar pane while paused in pretty printed
Breakpoint sidebar pane while paused in raw
Script execution resumed.
Running: testBreakpointSetInOriginalAndRemovedInFormatted
Adding breakpoint.
Formatting.
Removing breakpoint.
Unformatting.
Debugger was disabled.
......@@ -3,16 +3,7 @@
<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 = {};
......@@ -49,50 +40,14 @@ var test = function()
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>
Tests the script formatting is working fine with breakpoints.
Debugger was enabled.
Running: testBreakpointsSetInFormattedAndRemoveInOriginalSource
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.
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>
var test = function()
{
WebInspector.breakpointManager._storage._breakpoints = {};
var panel = WebInspector.inspectorView.showPanel("sources");
var scriptFormatter = InspectorTest.scriptFormatter();
var sourceFrame;
var formattedSourceFrame;
InspectorTest.runDebuggerTestSuite([
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);
}
}
]);
}
</script>
</head>
<body onload="runTest()">
<p>Tests the script formatting is working fine with breakpoints.
</p>
</body>
</html>
Tests the script formatting is working fine with breakpoints.
Debugger was enabled.
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.inspectorView.showPanel("sources");
var scriptFormatter = InspectorTest.scriptFormatter();
var sourceFrame;
var formattedSourceFrame;
InspectorTest.runDebuggerTestSuite([
function testBreakpointSetInOriginalAndRemovedInFormatted(next)
{
InspectorTest.showScriptSource("script-formatter-breakpoints-4.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