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

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: added test for decorations, edit one is coming 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
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..5775da6e16a75ef4dd192143acb903782ade7422 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,17 @@ InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, lineNumber)[0].remove();
};
+InspectorTest.createNewBreakpoint = function(sourceFrame, lineNumber, condition, enabled)
+{
+ sourceFrame._createNewBreakpoint(lineNumber, condition, enabled);
+}
+
+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 +627,21 @@ InspectorTest.evaluateOnCurrentCallFrame = function(code)
return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCallFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)));
}
+InspectorTest.waitJavaScriptSourceFrameBreakpoints = function(sourceFrame)
lushnikov 2016/11/18 21:44:46 let's wait for amount of resolved breakpoints in b
kozy 2016/11/19 00:46:09 Done.
+{
+ return new Promise(resolve => InspectorTest.addSniffer(sourceFrame.__proto__, "_breakpointDecorationsUpdatedForTest", 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" : ""));
+ }
+}
+
};

Powered by Google App Engine
This is Rietveld 408576698