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

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

Issue 2735133004: DevTools coverage: get script/stylesheet size directly, do not request content (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/coverage/CoverageModel.js » ('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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 585
586 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback) 586 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback)
587 { 587 {
588 target = target || SDK.targetManager.mainTarget(); 588 target = target || SDK.targetManager.mainTarget();
589 var debuggerModel = SDK.DebuggerModel.fromTarget(target); 589 var debuggerModel = SDK.DebuggerModel.fromTarget(target);
590 var scriptId = ++InspectorTest._lastScriptId + ""; 590 var scriptId = ++InspectorTest._lastScriptId + "";
591 var lineCount = source.computeLineEndings().length; 591 var lineCount = source.computeLineEndings().length;
592 var endLine = startLine + lineCount - 1; 592 var endLine = startLine + lineCount - 1;
593 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.computeLineEndings()[lineCount - 2]; 593 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.computeLineEndings()[lineCount - 2];
594 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); 594 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
595 var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startCo lumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL ); 595 var script = new SDK.Script(debuggerModel, scriptId, url, startLine, startCo lumn, endLine, endColumn, 0, "", isContentScript, false, undefined, hasSourceURL , source.length);
596 script.requestContent = function() 596 script.requestContent = function()
597 { 597 {
598 var trimmedSource = SDK.Script._trimSourceURLComment(source); 598 var trimmedSource = SDK.Script._trimSourceURLComment(source);
599 return Promise.resolve(trimmedSource); 599 return Promise.resolve(trimmedSource);
600 }; 600 };
601 if (preRegisterCallback) 601 if (preRegisterCallback)
602 preRegisterCallback(script); 602 preRegisterCallback(script);
603 debuggerModel._registerScript(script); 603 debuggerModel._registerScript(script);
604 return script; 604 return script;
605 }; 605 };
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 var bookmark = bookmarks[index]; 729 var bookmark = bookmarks[index];
730 if (bookmark) { 730 if (bookmark) {
731 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb olForTest].click(); 731 bookmark[Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymb olForTest].click();
732 } else { 732 } else {
733 InspectorTest.addResult(`Could not click on Javascript breakpoint - line Number: ${lineNumber}, index: ${index}`); 733 InspectorTest.addResult(`Could not click on Javascript breakpoint - line Number: ${lineNumber}, index: ${index}`);
734 next(); 734 next();
735 } 735 }
736 } 736 }
737 737
738 }; 738 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/coverage/CoverageModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698