| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |