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

Unified Diff: LayoutTests/inspector/sources/debugger/set-breakpoint.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/set-breakpoint.html
diff --git a/LayoutTests/inspector/sources/debugger/set-breakpoint.html b/LayoutTests/inspector/sources/debugger/set-breakpoint.html
deleted file mode 100644
index 2a6cfbccc46b16aed4327aa9dd41bdc6b06ba826..0000000000000000000000000000000000000000
--- a/LayoutTests/inspector/sources/debugger/set-breakpoint.html
+++ /dev/null
@@ -1,151 +0,0 @@
-<html>
-<head>
-<script src="../../../http/tests/inspector/inspector-test.js"></script>
-<script src="../../../http/tests/inspector/debugger-test.js"></script>
-
-<script>
-function oneLineTestFunction() { return 0; }
-</script>
-
-<script>
-function oneLineTestFunction2() { return 0; }</script>
-
-<script>
-
-function testFunction()
-{
- var x = Math.sqrt(10);
- return x;
-}
-
-var test = function()
-{
- var currentSourceFrame;
- InspectorTest.setQuiet(true);
- InspectorTest.runDebuggerTestSuite([
- function testSetBreakpoint(next)
- {
- InspectorTest.showScriptSource("set-breakpoint.html", didShowScriptSource);
-
- function didShowScriptSource(sourceFrame)
- {
- currentSourceFrame = sourceFrame;
- InspectorTest.addResult("Script source was shown.");
- setBreakpointAndWaitUntilPaused(currentSourceFrame, 16, didPause);
- InspectorTest.runTestFunction();
- }
-
- function didPause(callFrames)
- {
- InspectorTest.addResult("Script execution paused.");
- InspectorTest.captureStackTrace(callFrames);
- InspectorTest.dumpBreakpointSidebarPane();
- InspectorTest.addSniffer(currentSourceFrame, "_removeBreakpointDecoration", breakpointRemoved);
- InspectorTest.removeBreakpoint(currentSourceFrame, 16);
- }
-
- function breakpointRemoved()
- {
- InspectorTest.resumeExecution(didResume);
- }
-
- function didResume()
- {
- InspectorTest.dumpBreakpointSidebarPane()
- InspectorTest.addResult("Script execution resumed.");
- next();
- }
- },
-
- function testSetBreakpointOnTheLastLine(next)
- {
- InspectorTest.showScriptSource("set-breakpoint.html", didShowScriptSource);
-
- function didShowScriptSource(sourceFrame)
- {
- currentSourceFrame = sourceFrame;
- setBreakpointAndWaitUntilPaused(currentSourceFrame, 6, didPause);
- InspectorTest.evaluateInPage("setTimeout(oneLineTestFunction, 0)");
- }
-
- function didPause(callFrames)
- {
- InspectorTest.captureStackTrace(callFrames);
- InspectorTest.removeBreakpoint(currentSourceFrame, 6);
- InspectorTest.resumeExecution(next);
- }
- },
-
- function testSetBreakpointOnTheLastLine2(next)
- {
- InspectorTest.showScriptSource("set-breakpoint.html", didShowScriptSource);
-
- function didShowScriptSource(sourceFrame)
- {
- currentSourceFrame = sourceFrame;
- InspectorTest.setBreakpoint(currentSourceFrame, 10, "", true);
- InspectorTest.waitUntilPaused(didPause);
- InspectorTest.evaluateInPage("setTimeout(oneLineTestFunction2, 0)");
- }
-
- function didPause(callFrames)
- {
- InspectorTest.captureStackTrace(callFrames);
- InspectorTest.removeBreakpoint(currentSourceFrame, 10);
- InspectorTest.resumeExecution(next);
- }
- },
-
- function testSetBreakpointOnTheSameLine(next)
- {
- InspectorTest.DebuggerAgent.setBreakpointByUrl(1, "foo.js", undefined, 2, "", didSetBreakpoint);
-
- function didSetBreakpoint(error, breakpointId)
- {
- InspectorTest.assertTrue(!error);
- InspectorTest.assertTrue(!!breakpointId);
- InspectorTest.DebuggerAgent.setBreakpointByUrl(1, "foo.js", undefined, 2, "", didSetBreakpointAgain);
- }
-
- function didSetBreakpointAgain(error, breakpointId)
- {
- InspectorTest.assertTrue(!!error);
- InspectorTest.assertTrue(!breakpointId);
- next();
- }
- }
- ]);
-
- function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCallback)
- {
- var expectedBreakpointId;
- InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.prototype, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger);
- InspectorTest.setBreakpoint(sourceFrame, lineNumber, "", true);
-
- function didSetBreakpointInDebugger(callback, breakpointId)
- {
- expectedBreakpointId = breakpointId;
- InspectorTest.waitUntilPaused(didPause);
- }
-
- function didPause(callFrames, reason, breakpointIds)
- {
- InspectorTest.assertEquals(breakpointIds.length, 1);
- InspectorTest.assertEquals(breakpointIds[0], expectedBreakpointId);
- InspectorTest.assertEquals(reason, "other");
-
- pausedCallback(callFrames);
- }
- }
-}
-
-</script>
-</head>
-
-<body onload="runTest()">
-<p>
-Tests setting breakpoints.
-</p>
-
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698