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

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

Issue 2795193003: DevTools: carefully cleanup script UISourceCodes (Closed)
Patch Set: Created 3 years, 8 months 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
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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 } 567 }
568 }; 568 };
569 569
570 InspectorTest.setQuiet = function(quiet) 570 InspectorTest.setQuiet = function(quiet)
571 { 571 {
572 InspectorTest._quiet = quiet; 572 InspectorTest._quiet = quiet;
573 }; 573 };
574 574
575 InspectorTest.queryScripts = function(filter) 575 InspectorTest.queryScripts = function(filter)
576 { 576 {
577 var scripts = []; 577 var scripts = InspectorTest.debuggerModel.scripts();
578 for (var scriptId in InspectorTest.debuggerModel._scripts) { 578 return filter ? scripts.filter(filter) : scripts;
579 var script = InspectorTest.debuggerModel._scripts[scriptId];
580 if (!filter || filter(script))
581 scripts.push(script);
582 }
583 return scripts;
584 }; 579 };
585 580
586 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback) 581 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback)
587 { 582 {
588 target = target || SDK.targetManager.mainTarget(); 583 target = target || SDK.targetManager.mainTarget();
589 var debuggerModel = target.model(SDK.DebuggerModel); 584 var debuggerModel = target.model(SDK.DebuggerModel);
590 var scriptId = ++InspectorTest._lastScriptId + ""; 585 var scriptId = ++InspectorTest._lastScriptId + "";
591 var lineCount = source.computeLineEndings().length; 586 var lineCount = source.computeLineEndings().length;
592 var endLine = startLine + lineCount - 1; 587 var endLine = startLine + lineCount - 1;
593 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.computeLineEndings()[lineCount - 2]; 588 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.computeLineEndings()[lineCount - 2];
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 var bookmark = bookmarks[index]; 725 var bookmark = bookmarks[index];
731 if (bookmark) { 726 if (bookmark) {
732 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb olForTest].click(); 727 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb olForTest].click();
733 } else { 728 } else {
734 InspectorTest.addResult(`Could not click on Javascript breakpoint - line Number: ${lineNumber}, index: ${index}`); 729 InspectorTest.addResult(`Could not click on Javascript breakpoint - line Number: ${lineNumber}, index: ${index}`);
735 next(); 730 next();
736 } 731 }
737 } 732 }
738 733
739 }; 734 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698