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

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

Issue 1755123003: Timeline: quit using Progress, introduce TimelineLifecycleDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed 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/timeline-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 if (window.GCController) 1 if (window.GCController)
2 GCController.collectAll(); 2 GCController.collectAll();
3 var initialize_InspectorTest = function() { 3 var initialize_InspectorTest = function() {
4 4
5 var results = []; 5 var results = [];
6 6
7 function consoleOutputHook(messageType) 7 function consoleOutputHook(messageType)
8 { 8 {
9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1)); 9 InspectorTest.addResult(messageType + ": " + Array.prototype.slice.call(argu ments, 1));
10 } 10 }
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 /** 789 /**
790 * @constructor 790 * @constructor
791 * @param {!string} dirPath 791 * @param {!string} dirPath
792 * @param {!string} name 792 * @param {!string} name
793 * @param {!function(?WebInspector.TempFile)} callback 793 * @param {!function(?WebInspector.TempFile)} callback
794 */ 794 */
795 InspectorTest.TempFileMock = function(dirPath, name) 795 InspectorTest.TempFileMock = function(dirPath, name)
796 { 796 {
797 this._chunks = []; 797 this._chunks = [];
798 this._name = name; 798 this._name = name;
799 this._size = 0;
800 } 799 }
801 800
802 InspectorTest.TempFileMock.prototype = { 801 InspectorTest.TempFileMock.prototype = {
803 /** 802 /**
804 * @param {!Array.<string>} chunks 803 * @param {!Array.<string>} chunks
805 * @param {!function(boolean)} callback 804 * @param {!function(boolean)} callback
806 */ 805 */
807 write: function(chunks, callback) 806 write: function(chunks, callback)
808 { 807 {
808 var size = 0;
809 for (var i = 0; i < chunks.length; ++i) 809 for (var i = 0; i < chunks.length; ++i)
810 this._size += chunks[i].length; 810 size += chunks[i].length;
811 this._chunks.push.apply(this._chunks, chunks); 811 this._chunks.push.apply(this._chunks, chunks);
812 setTimeout(callback.bind(this, this._size), 1); 812 setTimeout(callback.bind(this, size), 1);
813 }, 813 },
814 814
815 finishWriting: function() { }, 815 finishWriting: function() { },
816 816
817 /** 817 /**
818 * @param {function(?string)} callback 818 * @param {function(?string)} callback
819 */ 819 */
820 read: function(callback) 820 read: function(callback)
821 { 821 {
822 this.readRange(undefined, undefined, callback); 822 this.readRange(undefined, undefined, callback);
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1199 _output("[page] " + text); 1199 _output("[page] " + text);
1200 } 1200 }
1201 1201
1202 function _output(result) 1202 function _output(result)
1203 { 1203 {
1204 if (!outputElement) 1204 if (!outputElement)
1205 createOutputElement(); 1205 createOutputElement();
1206 outputElement.appendChild(document.createTextNode(result)); 1206 outputElement.appendChild(document.createTextNode(result));
1207 outputElement.appendChild(document.createElement("br")); 1207 outputElement.appendChild(document.createElement("br"));
1208 } 1208 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/timeline-test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698