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

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

Issue 644093003: NOP refactor to make various layout tests use setTimeout 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 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 dfa60dfc460bbc53244b852f4eb1534e80a0745a..92aaec0ca1958aab88599bfb6d4e3b1418037b7a 100644
--- a/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/LayoutTests/http/tests/inspector/inspector-test.js
@@ -49,7 +49,8 @@ InspectorTest.evaluateInPage = function(code, callback)
InspectorTest.evaluateInPageWithTimeout = function(code)
{
- InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'))");
+ // FIXME: we need a better way of waiting for chromium events to happen
+ InspectorTest.evaluateInPage("setTimeout(unescape('" + escape(code) + "'), 1)");
}
var lastEvalId = 0;
@@ -445,7 +446,7 @@ InspectorTest.TempFileMock = function(dirPath, name, callback)
{
this._chunks = [];
this._name = name;
- setTimeout(callback.bind(this, this), 0);
+ setTimeout(callback.bind(this, this), 1);
}
InspectorTest.TempFileMock.prototype = {
@@ -456,7 +457,7 @@ InspectorTest.TempFileMock.prototype = {
write: function(strings, callback)
{
this._chunks.push.apply(this._chunks, strings);
- setTimeout(callback.bind(this, true), 0);
+ setTimeout(callback.bind(this, true), 1);
},
finishWriting: function() { },
@@ -600,17 +601,18 @@ function closeFrontend(callback)
{
// Do this asynchronously to allow InspectorBackendDispatcher to send response
// back to the frontend before it's destroyed.
+ // FIXME: we need a better way of waiting for chromium events to happen
setTimeout(function() {
testRunner.closeWebInspector();
callback();
- }, 0);
+ }, 1);
}
function openFrontendAndIncrement()
{
frontendReopeningCount++;
testRunner.showWebInspector();
- setTimeout(runTest, 0);
+ setTimeout(runTest, 1);
}
function runAfterIframeIsLoaded()
« no previous file with comments | « LayoutTests/fast/events/scroll-event-raf-timing.html ('k') | LayoutTests/inspector/tracing/resources/worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698