Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: LayoutTests/inspector/sources/debugger/skip-pauses-until-reload.html

Issue 1153923005: DevTools: shard inspector/debugger tests for faster execution. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/sources/debugger/skip-pauses-until-reload.html
diff --git a/LayoutTests/inspector/sources/debugger/skip-pauses-until-reload.html b/LayoutTests/inspector/sources/debugger/skip-pauses-until-reload.html
deleted file mode 100644
index 42e442a3c3ecd394575af2e6ccdc41262c2d534d..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/sources/debugger/skip-pauses-until-reload.html
+++ /dev/null
@@ -1,156 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/elements-test.js"></script>
-<script src="../../../http/tests/inspector/debugger-test.js"></script>
-<script>
-
-function testFunction()
-{
- console.log("Begin");
- debugger; // Reload follows, nothing below should break.
- console.log("Middle: Breakpoint 1"); // Breakpoint
- console.log("Middle: Breakpoint 2"); // Breakpoint
- console.assert(false, "Assertion failed!");
- console.error("Some console.error message");
- debugger; // Should skip this also.
- var element = document.getElementById("element");
- var parent = element.parentElement;
- var child = document.createElement("span");
- element.setAttribute("foo", "bar"); // DOM breakpoint: AttributeModified
- element.appendChild(child); // DOM breakpoint: SubtreeModified
- parent.removeChild(element); // DOM breakpoint: NodeRemoved
- parent.appendChild(element);
- element.click(); // Event breakpoint
- console.log("End");
- // Should be last.
- eval("throwException()");
-}
-
-function throwException()
-{
- function inner()
- {
- try {
- if (window.foo === 1)
- throw new Error("error message");
- } finally {
- ++window.foo;
- }
- }
- try {
- window.foo = 1;
- inner();
- } finally {
- ++window.foo;
- }
-}
-
-function test()
-{
- InspectorTest.startDumpingProtocolMessages();
- InspectorTest.startDebuggerTest(step1);
-
- function step1()
- {
- InspectorTest.showScriptSource("skip-pauses-until-reload.html", didShowScriptSource);
- }
-
- function didShowScriptSource(sourceFrame)
- {
- InspectorTest.addResult("Script source was shown.");
- InspectorTest.addResult("Set up breakpoints.");
- InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
- InspectorTest.setBreakpoint(sourceFrame, 12, "", true);
- InspectorTest.addResult("Set up to pause on all exceptions.");
- // FIXME: Test is flaky with PauseOnAllExceptions due to races in debugger.
- InspectorTest.DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions);
- InspectorTest.nodeWithId("element", didResolveNode);
- testRunner.logToStderr("didShowScriptSource");
- }
-
- function didResolveNode(node)
- {
- testRunner.logToStderr("didResolveNode");
- var pane = WebInspector.domBreakpointsSidebarPane;
- InspectorTest.addResult("Set up DOM breakpoints.");
- pane._setBreakpoint(node, pane._breakpointTypes.SubtreeModified, true);
- pane._setBreakpoint(node, pane._breakpointTypes.AttributeModified, true);
- pane._setBreakpoint(node, pane._breakpointTypes.NodeRemoved, true);
- setUpEventBreakpoints();
- }
-
- function setUpEventBreakpoints()
- {
- testRunner.logToStderr("setUpEventBreakpoints");
- var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
- InspectorTest.addResult("Set up Event breakpoints.");
- pane._setBreakpoint("listener:click");
- InspectorTest.runAfterPendingDispatches(didSetUp);
- }
-
- function didSetUp()
- {
- testRunner.logToStderr("didSetUp");
- InspectorTest.addResult("Did set up.");
- InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
- }
-
- function didPause(callFrames)
- {
- testRunner.logToStderr("didPause");
- InspectorTest.captureStackTrace(callFrames);
- InspectorTest.DebuggerAgent.setSkipAllPauses(true, didSetSkipAllPauses);
- }
-
- function didSetSkipAllPauses()
- {
- testRunner.logToStderr("didSetSkipAllPauses");
- InspectorTest.addResult("Set up to skip all pauses.");
- doReloadPage();
- }
-
- function doReloadPage()
- {
- testRunner.logToStderr("doReloadPage");
- InspectorTest.addResult("Reloading the page...");
- InspectorTest.waitUntilPausedNextTime(didPauseAfterReload);
- InspectorTest.reloadPage(didReloadPage);
- }
-
- function didReloadPage()
- {
- testRunner.logToStderr("didReloadPage");
- InspectorTest.addResult("PASS: Reloaded without hitting breakpoints.");
- completeTest();
- }
-
- function didPauseAfterReload(callFrames)
- {
- testRunner.logToStderr("didPauseAfterReload");
- InspectorTest.addResult("FAIL: Should not pause while reloading the page!");
- InspectorTest.captureStackTrace(callFrames);
- InspectorTest.waitUntilPausedNextTime(didPauseAfterReload);
- InspectorTest.resumeExecution();
- }
-
- function completeTest()
- {
- testRunner.logToStderr("completeTest");
- var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
- pane._removeBreakpoint("listener:click");
- InspectorTest.completeDebuggerTest();
- }
-};
-
-</script>
-
-</head>
-
-<body onload="runTest()">
-<p>Tests that 'skip all pauses' mode blocks breakpoint and gets cancelled right at page reload.
-</p>
-
-<div id="element" onclick="return 0;"></div>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698