aboutsummaryrefslogtreecommitdiffstats
path: root/tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js')
-rw-r--r--tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js b/tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js
index fa3b09c7d84..de9b7837900 100644
--- a/tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js
+++ b/tests/wpt/web-platform-tests/css/css-transitions/support/runParallelAsyncHarness.js
@@ -113,8 +113,8 @@ root.runParallelAsyncHarness = function(options) {
});
});
- // conclude test (possibly abort)
- setTimeout(function() {
+ // conclude slice (possibly abort)
+ var concludeSlice = function() {
tests.forEach(function(data) {
// perform individual "done" test-case
cases.forEach(function(name) {
@@ -135,7 +135,10 @@ root.runParallelAsyncHarness = function(options) {
// next test please, give the browser 50ms to do catch its breath
setTimeout(runLoop, 50);
- }, duration);
+ }
+
+ // wait on RAF before cleanup to make sure all queued event handlers have run
+ setTimeout(function() {requestAnimationFrame(concludeSlice)},duration);
}
// allow DOMContentLoaded before actually doing something