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

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

Issue 615033002: Refactor of various layout tests to use RAF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix use-detatch.svg 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..dedbb144ecef5c39e1887c019e54ba5933e7f570 100644
--- a/LayoutTests/http/tests/inspector/inspector-test.js
+++ b/LayoutTests/http/tests/inspector/inspector-test.js
@@ -445,7 +445,7 @@ InspectorTest.TempFileMock = function(dirPath, name, callback)
{
this._chunks = [];
this._name = name;
- setTimeout(callback.bind(this, this), 0);
+ requestAnimationFrame(callback.bind(this, this));
}
InspectorTest.TempFileMock.prototype = {
@@ -456,7 +456,7 @@ InspectorTest.TempFileMock.prototype = {
write: function(strings, callback)
{
this._chunks.push.apply(this._chunks, strings);
- setTimeout(callback.bind(this, true), 0);
+ requestAnimationFrame(callback.bind(this, true));
},
finishWriting: function() { },
@@ -600,17 +600,17 @@ function closeFrontend(callback)
{
// Do this asynchronously to allow InspectorBackendDispatcher to send response
// back to the frontend before it's destroyed.
- setTimeout(function() {
+ requestAnimationFrame(function() {
testRunner.closeWebInspector();
callback();
- }, 0);
+ });
}
function openFrontendAndIncrement()
{
frontendReopeningCount++;
testRunner.showWebInspector();
- setTimeout(runTest, 0);
+ requestAnimationFrame(runTest);
}
function runAfterIframeIsLoaded()
@@ -763,9 +763,9 @@ function closeInspectorAndNotifyDone()
clearTimeout(window._watchDogTimer);
testRunner.closeWebInspector();
- setTimeout(function() {
+ requestAnimationFrame(function() {
testRunner.notifyDone();
- }, 0);
+ });
}
var outputElement;

Powered by Google App Engine
This is Rietveld 408576698