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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function scheduleTestFunction() 1 function scheduleTestFunction()
2 { 2 {
3 setTimeout(testFunction, 0); 3 setTimeout(testFunction, 0);
4 } 4 }
5 5
6 var initialize_DebuggerTest = function() { 6 var initialize_DebuggerTest = function() {
7 7
8 InspectorTest.preloadPanel("sources"); 8 InspectorTest.preloadPanel("sources");
9 9
10 InspectorTest.startDebuggerTest = function(callback, quiet) 10 InspectorTest.startDebuggerTest = function(callback, quiet)
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 { 418 {
419 if (!sourceFrame._muted) 419 if (!sourceFrame._muted)
420 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled); 420 sourceFrame._setBreakpoint(lineNumber, 0, condition, enabled);
421 }; 421 };
422 422
423 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber) 423 InspectorTest.removeBreakpoint = function(sourceFrame, lineNumber)
424 { 424 {
425 sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, li neNumber)[0].remove(); 425 sourceFrame._breakpointManager.findBreakpoints(sourceFrame._uiSourceCode, li neNumber)[0].remove();
426 }; 426 };
427 427
428 InspectorTest.waitBreakpointSidebarPane = function()
429 {
430 return new Promise(resolve => InspectorTest.addSniffer(Sources.JavaScriptBre akpointsSidebarPane.prototype, "_didUpdateForTest", resolve));
431 }
432
433 InspectorTest.breakpointsSidebarPaneContent = function()
434 {
435 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsS idebarPane).contentElement;
436 var empty = paneElement.querySelector('.gray-info-message');
437 if (empty)
438 return InspectorTest.textContentWithLineBreaks(empty);
439 var entries = Array.from(paneElement.querySelectorAll('.breakpoint-entry'));
440 return entries.map(InspectorTest.textContentWithLineBreaks).join('\n');
441 }
442
428 InspectorTest.dumpBreakpointSidebarPane = function(title) 443 InspectorTest.dumpBreakpointSidebarPane = function(title)
429 { 444 {
430 var paneElement = self.runtime.sharedInstance(Sources.JavaScriptBreakpointsS idebarPane).element;
431 InspectorTest.addResult("Breakpoint sidebar pane " + (title || "")); 445 InspectorTest.addResult("Breakpoint sidebar pane " + (title || ""));
432 InspectorTest.addResult(InspectorTest.textContentWithLineBreaks(paneElement) ); 446 InspectorTest.addResult(InspectorTest.breakpointsSidebarPaneContent());
433 }; 447 };
434 448
435 InspectorTest.dumpScopeVariablesSidebarPane = function() 449 InspectorTest.dumpScopeVariablesSidebarPane = function()
436 { 450 {
437 InspectorTest.addResult("Scope variables sidebar pane:"); 451 InspectorTest.addResult("Scope variables sidebar pane:");
438 var sections = InspectorTest.scopeChainSections(); 452 var sections = InspectorTest.scopeChainSections();
439 for (var i = 0; i < sections.length; ++i) { 453 for (var i = 0; i < sections.length; ++i) {
440 var textContent = InspectorTest.textContentWithLineBreaks(sections[i].el ement); 454 var textContent = InspectorTest.textContentWithLineBreaks(sections[i].el ement);
441 var text = InspectorTest.clearSpecificInfoFromStackFrames(textContent); 455 var text = InspectorTest.clearSpecificInfoFromStackFrames(textContent);
442 if (text.length > 0) 456 if (text.length > 0)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 var listItem = threadsPane._listItemForTarget(target); 610 var listItem = threadsPane._listItemForTarget(target);
597 threadsPane._onListItemClick(listItem); 611 threadsPane._onListItemClick(listItem);
598 } 612 }
599 613
600 InspectorTest.evaluateOnCurrentCallFrame = function(code) 614 InspectorTest.evaluateOnCurrentCallFrame = function(code)
601 { 615 {
602 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) ); 616 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) );
603 } 617 }
604 618
605 }; 619 };
OLDNEW
« 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