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

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

Issue 2491983002: [DevTools] reworked JavaScriptBreakpointsSidebarPane.js (Closed)
Patch Set: labal :( 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/http/tests/inspector/persistence/persistence-move-breakpoints.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 405a79ff54fade9e87ad85ce9d300732d3618eb8..fa304f74884d6b03074fb0555af9b5f1c5bf4f65 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/debugger-test.js
@@ -425,11 +425,25 @@ InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, lineNumber)[0].remove();
};
+InspectorTest.waitBreakpointSidebarPane = function()
+{
+ return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBreakpointsSidebarPane.prototype, "_didUpdateForTest", resolve));
+}
+
+InspectorTest.breakpointsSidebarPaneContent = function()
+{
+ var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).contentElement;
+ var empty = paneElement.querySelector('.gray-info-message');
+ if (empty)
+ return InspectorTest.textContentWithLineBreaks(empty);
+ var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
+ return entries.map(InspectorTest.textContentWithLineBreaks).join('\n');
+}
+
InspectorTest.dumpBreakpointSidebarPane = function(title)
{
- var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsSidebarPane).element;
InspectorTest.addResult("Breakpoint sidebar pane " + (title || ""));
- InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElement));
+ InspectorTest.addResult(InspectorTest.breakpointsSidebarPaneContent());
};
InspectorTest.dumpScopeVariablesSidebarPane = function()
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/persistence/persistence-move-breakpoints.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698