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

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

Issue 1809533003: DevTools: remove illusionary caching from String.prototype.lineEndings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: String.prototype.lineEndings -> String.prototype.computeLineEndings Created 4 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/LayoutTests/http/tests/inspector/sources-test.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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 scripts.push(script); 507 scripts.push(script);
508 } 508 }
509 return scripts; 509 return scripts;
510 }; 510 };
511 511
512 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback) 512 InspectorTest.createScriptMock = function(url, startLine, startColumn, isContent Script, source, target, preRegisterCallback)
513 { 513 {
514 target = target || WebInspector.targetManager.mainTarget(); 514 target = target || WebInspector.targetManager.mainTarget();
515 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); 515 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target);
516 var scriptId = ++InspectorTest._lastScriptId + ""; 516 var scriptId = ++InspectorTest._lastScriptId + "";
517 var lineCount = source.lineEndings().length; 517 var lineCount = source.computeLineEndings().length;
518 var endLine = startLine + lineCount - 1; 518 var endLine = startLine + lineCount - 1;
519 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.lineEndings()[lineCount - 2]; 519 var endColumn = lineCount === 1 ? startColumn + source.length : source.lengt h - source.computeLineEndings()[lineCount - 2];
520 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m); 520 var hasSourceURL = !!source.match(/\/\/#\ssourceURL=\s*(\S*?)\s*$/m) || !!so urce.match(/\/\/@\ssourceURL=\s*(\S*?)\s*$/m);
521 var script = new WebInspector.Script(debuggerModel, scriptId, url, startLine , startColumn, endLine, endColumn, 0, "", isContentScript, false, false, undefin ed, hasSourceURL); 521 var script = new WebInspector.Script(debuggerModel, scriptId, url, startLine , startColumn, endLine, endColumn, 0, "", isContentScript, false, false, undefin ed, hasSourceURL);
522 script.requestContent = function() 522 script.requestContent = function()
523 { 523 {
524 var trimmedSource = WebInspector.Script._trimSourceURLComment(source); 524 var trimmedSource = WebInspector.Script._trimSourceURLComment(source);
525 return Promise.resolve(trimmedSource); 525 return Promise.resolve(trimmedSource);
526 }; 526 };
527 if (preRegisterCallback) 527 if (preRegisterCallback)
528 preRegisterCallback(script); 528 preRegisterCallback(script);
529 debuggerModel._registerScript(script); 529 debuggerModel._registerScript(script);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg erModel.fromTarget(target)); 579 var listItem = threadsPane._debuggerModelToListItems.get(WebInspector.Debugg erModel.fromTarget(target));
580 threadsPane._onListItemClick(listItem); 580 threadsPane._onListItemClick(listItem);
581 } 581 }
582 582
583 InspectorTest.evaluateOnCurrentCallFrame = function(code) 583 InspectorTest.evaluateOnCurrentCallFrame = function(code)
584 { 584 {
585 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) ); 585 return new Promise(succ => InspectorTest.debuggerModel.evaluateOnSelectedCal lFrame(code, "console", false, true, false, false, InspectorTest.safeWrap(succ)) );
586 } 586 }
587 587
588 }; 588 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/sources-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698