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

Unified Diff: LayoutTests/inspector/debugger/set-breakpoint.html

Issue 15096004: Passing hit breakpoint IDs to ScriptDebugServer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: CR comments addressed. Created 7 years, 6 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
« no previous file with comments | « LayoutTests/http/tests/inspector/debugger-test.js ('k') | Source/bindings/v8/DebuggerScript.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/debugger/set-breakpoint.html
diff --git a/LayoutTests/inspector/debugger/set-breakpoint.html b/LayoutTests/inspector/debugger/set-breakpoint.html
index 82cebadcb4095aa178c0308a35a97e1681bb0935..29cffda30297ca36bd08cb764b7a96d3c82e96d9 100644
--- a/LayoutTests/inspector/debugger/set-breakpoint.html
+++ b/LayoutTests/inspector/debugger/set-breakpoint.html
@@ -31,8 +31,8 @@ var test = function()
{
currentSourceFrame = sourceFrame;
InspectorTest.addResult("Script source was shown.");
- InspectorTest.setBreakpoint(currentSourceFrame, 16, "", true);
- InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
+ setBreakpointAndWaitUntilPaused(currentSourceFrame, 16, didPause);
+ InspectorTest.runTestFunction();
}
function didPause(callFrames)
@@ -64,8 +64,7 @@ var test = function()
function didShowScriptSource(sourceFrame)
{
currentSourceFrame = sourceFrame;
- InspectorTest.setBreakpoint(currentSourceFrame, 6, "", true);
- InspectorTest.waitUntilPaused(didPause);
+ setBreakpointAndWaitUntilPaused(currentSourceFrame, 6, didPause);
InspectorTest.evaluateInPage("setTimeout(oneLineTestFunction, 0)");
}
@@ -124,6 +123,28 @@ var test = function()
InspectorTest.addResult("Dump breakpoint sidebar pane:");
InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElement));
}
+
+ function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, pausedCallback)
+ {
+ var expectedBreakpointId;
+ InspectorTest.addSniffer(WebInspector.BreakpointManager.Breakpoint.prototype, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger);
+ InspectorTest.setBreakpoint(sourceFrame, lineNumber, "", true);
+
+ function didSetBreakpointInDebugger(breakpointId)
+ {
+ expectedBreakpointId = breakpointId;
+ InspectorTest.waitUntilPaused(didPause);
+ }
+
+ function didPause(callFrames, reason, breakpointIds)
+ {
+ InspectorTest.assertEquals(breakpointIds.length, 1);
+ InspectorTest.assertEquals(breakpointIds.length && breakpointIds[0], expectedBreakpointId);
yurys 2013/06/05 13:30:29 InspectorTest.assertEquals(breakpointIds[0], expec
SeRya 2013/06/05 13:41:08 Done.
+ InspectorTest.assertEquals(reason, "other");
+
+ pausedCallback(callFrames);
+ }
+ }
}
</script>
« no previous file with comments | « LayoutTests/http/tests/inspector/debugger-test.js ('k') | Source/bindings/v8/DebuggerScript.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698