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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js

Issue 2505413002: [DevTools] Prepare JavaScriptSourceFrame for multiple breakpoints per line (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
index fa304f74884d6b03074fb0555af9b5f1c5bf4f65..831baa5578c42e02a38debcf001cf66333fdf2dc 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
@@ -425,6 +425,19 @@ InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, lineNumber)[0].remove();
};
+InspectorTest.createNewBreakpoint = function(sourceFrame, lineNumber, condition, enabled)
+{
+ var promise = new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointWasSetForTest", resolve));
+ sourceFrame._createNewBreakpoint(lineNumber, condition, enabled);
+ return promise;
+}
+
+InspectorTest.toggleBreakpoint = function(sourceFrame, lineNumber, disableOnly)
+{
+ if (!sourceFrame._muted)
+ sourceFrame._toggleBreakpoint(lineNumber, disableOnly);
+};
+
InspectorTest.waitBreakpointSidebarPane = function()
{
return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBreakpointsSidebarPane.prototype, "_didUpdateForTest", resolve));
@@ -616,4 +629,32 @@ InspectorTest.evaluateOnCurrentCallFrame = function(code)
return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCallFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)));
}
+InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame)
+{
+ return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointDecorationsUpdatedForTest", resolveIfAllBreakpointsResolved.bind(null, resolve)));
+
+ function resolveIfAllBreakpointsResolved(resolve)
+ {
+ for (var breakpoint of Bindings.breakpointManager._allBreakpoints()) {
+ if (breakpoint._fakePrimaryLocation && breakpoint.enabled()) {
+ InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointDecorationsUpdatedForTest", resolveIfAllBreakpointsResolved.bind(null, resolve));
+ return;
+ }
+ }
+ resolve();
+ }
+}
+
+InspectorTest.dumpJavaScriptSourceFrameBreakpoints = function(sourceFrame)
+{
+ var textEditor = sourceFrame._textEditor;
+ for (var lineNumber = 0; lineNumber < textEditor.linesCount; ++lineNumber) {
+ if (!textEditor.hasLineClass(lineNumber, "cm-breakpoint"))
+ continue;
+ var disabled = textEditor.hasLineClass(lineNumber, "cm-breakpoint-disabled");
+ var conditional = textEditor.hasLineClass(lineNumber, "cm-breakpoint-conditional")
+ InspectorTest.addResult("breakpoint at " + lineNumber + (disabled ? " disabled" : "") + (conditional ? " conditional" : ""));
+ }
+}
+
};
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger-breakpoints/breakpoint-manager.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698