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

Unified Diff: LayoutTests/http/tests/inspector/inspector-test.js

Issue 705063004: DevTools: Promisify WebInspector.TempFile (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: teste were fixed Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/inspector/inspector-test.js
diff --git a/LayoutTests/http/tests/inspector/inspector-test.js b/LayoutTests/http/tests/inspector/inspector-test.js
index 73dd86ff280fa362eec60e514d2d0d39b299ce4c..6bcd7c0e5ab8a30e66ec220ef4a2a3a05c7d66b5 100644
--- a/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/LayoutTests/http/tests/inspector/inspector-test.js
@@ -445,11 +445,10 @@ InspectorTest.MockSetting.prototype = {
* @param {!string} name
* @param {!function(?WebInspector.TempFile)} callback
*/
-InspectorTest.TempFileMock = function(dirPath, name, callback)
+InspectorTest.TempFileMock = function(dirPath, name)
{
this._chunks = [];
this._name = name;
- setTimeout(callback.bind(this, this), 1);
}
InspectorTest.TempFileMock.prototype = {
@@ -527,6 +526,12 @@ InspectorTest.TempFileMock.prototype = {
remove: function() { }
}
+InspectorTest.TempFileMock.create = function(dirPath, name)
+{
+ var tempFile = new InspectorTest.TempFileMock(dirPath, name);
+ return Promise.resolve(tempFile);
+}
+
InspectorTest.dumpLoadedModules = function(next)
{
function moduleSorter(left, right)
@@ -581,8 +586,6 @@ InspectorTest.TimeoutMock.prototype = {
}
}
-WebInspector.TempFile = InspectorTest.TempFileMock;
-
WebInspector.targetManager.observeTargets({
targetAdded: function(target)
{

Powered by Google App Engine
This is Rietveld 408576698