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

Unified Diff: LayoutTests/resources/js-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/resources/js-test.js
diff --git a/LayoutTests/resources/js-test.js b/LayoutTests/resources/js-test.js
index 45fa85dcfd7865479fd9aca4638b80cd37038399..216e23005d293e88e2793b15885f1755f4b5948e 100644
--- a/LayoutTests/resources/js-test.js
+++ b/LayoutTests/resources/js-test.js
@@ -691,7 +691,7 @@ function shouldHaveHadError(message)
// function.
function asyncGC(callback) {
GCController.collectAll();
- setTimeout(callback, 0);
+ requestAnimationFrame(callback);
eseidel 2014/10/14 16:15:58 I might leave a comment to explain why RAF works b
}
function gc() {
@@ -715,7 +715,7 @@ function asyncMinorGC(callback) {
GCController.minorCollect();
else
testFailed("Minor GC is available only when you enable the --expose-gc option in V8.");
- setTimeout(callback, 0);
+ requestAnimationFrame(callback);
}
function isSuccessfullyParsed()

Powered by Google App Engine
This is Rietveld 408576698