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

Unified Diff: third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html

Issue 2411163003: CSS Animations: Reduce usage of setTimeout in Layout tests (Closed)
Patch Set: extra tests Created 4 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: third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html
diff --git a/third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html b/third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html
index 2d721670cd5357a602b66a16689f69c6167a04d3..08e03ba6725af91f86cd42f029d5ce4a72ed9c35 100644
--- a/third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html
+++ b/third_party/WebKit/LayoutTests/animations/animation-shorthand-name-order.html
@@ -102,11 +102,11 @@ function runIndividualTest(testIndex) {
clearElementAnimationStyle(element);
// Unfortunately need to force a style recalculation before testing.
- setTimeout(function () {
+ requestAnimationFrame(function () {
element.style.webkitAnimation = TEST_INPUTS[testIndex];
// And another forced style recalculation.
- setTimeout(function() {
+ requestAnimationFrame(function() {
var computedStyle = window.getComputedStyle(element);
for (var i=0; i < PROPERTIES_TO_TEST.length; i++) {
@@ -124,8 +124,8 @@ function runIndividualTest(testIndex) {
if (window.testRunner)
testRunner.notifyDone();
}
- }, 0);
- }, 0);
+ });
+ });
}
if (window.testRunner) {

Powered by Google App Engine
This is Rietveld 408576698