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

Unified Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html

Issue 2776523004: [DevTools] fixed some breakpoints-related tests (Closed)
Patch Set: more tests Created 3 years, 9 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: third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html
index a0f7f989c5473d68f304a8894861849d4884fc6b..bcecdff7aae6d236978f92b87023b387fc1267f2 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/set-conditional-breakpoint.html
@@ -32,8 +32,10 @@ var test = function()
{
currentSourceFrame = sourceFrame;
InspectorTest.addResult("Script source was shown.");
- setBreakpointAndWaitUntilPaused(currentSourceFrame, 16, "true", didPause);
- InspectorTest.runTestFunction();
+ InspectorTest.waitUntilPaused(didPause);
+ InspectorTest.createNewBreakpoint(currentSourceFrame, 16, "true", true)
+ .then(() => InspectorTest.waitBreakpointSidebarPane())
+ .then(() => InspectorTest.runTestFunction());
}
function didPause(callFrames)
@@ -66,10 +68,10 @@ var test = function()
{
currentSourceFrame = sourceFrame;
InspectorTest.addResult("Script source was shown.");
- setBreakpoint(currentSourceFrame, 16, "false");
- InspectorTest.runTestFunction();
- InspectorTest.waitBreakpointSidebarPane().then(testFunctionFinished);
-
+ InspectorTest.createNewBreakpoint(currentSourceFrame, 16, "false", true)
+ .then(() => InspectorTest.waitBreakpointSidebarPane())
+ .then(() => InspectorTest.runTestFunction())
+ .then(testFunctionFinished);
}
function testFunctionFinished(callFrames)
@@ -88,40 +90,6 @@ var test = function()
}
},
]);
-
- function setBreakpoint(sourceFrame, lineNumber, condition, callback)
- {
- var expectedBreakpointId;
- InspectorTest.addSniffer(Bindings.BreakpointManager.ModelBreakpoint.prototype, "_didSetBreakpointInDebugger", didSetBreakpointInDebugger);
- InspectorTest.setBreakpoint(sourceFrame, lineNumber, condition, true);
-
- function didSetBreakpointInDebugger(breakpointManagerCallback, breakpointId)
- {
- if (callback)
- callback(breakpointId);
- }
- }
-
- function setBreakpointAndWaitUntilPaused(sourceFrame, lineNumber, condition, pausedCallback)
- {
- setBreakpoint(sourceFrame, lineNumber, condition, didSetBreakpointInDebugger);
- var expectedBreakpointId;
-
- function didSetBreakpointInDebugger(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>

Powered by Google App Engine
This is Rietveld 408576698