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

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

Issue 2491983002: [DevTools] reworked JavaScriptBreakpointsSidebarPane.js (Closed)
Patch Set: rebased + better tests 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 405a79ff54fade9e87ad85ce9d300732d3618eb8..05b1e612a0f4c404870e28dbd14a6650bd0a0ef4 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()
lushnikov 2016/11/14 18:56:15 nit: you can avoid exposing breakpointsSidebarPane
kozy 2016/11/14 19:45:25 Acknowledged.
+{
+ 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()

Powered by Google App Engine
This is Rietveld 408576698