Index: LayoutTests/resources/run-after-display.js |
diff --git a/LayoutTests/resources/run-after-display.js b/LayoutTests/resources/run-after-display.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c42de0fa4429b14fb6bc2605a6222e445fd95ea7 |
--- /dev/null |
+++ b/LayoutTests/resources/run-after-display.js |
@@ -0,0 +1,8 @@ |
+function runAfterDisplay(callback) { |
+ window.requestAnimationFrame(function() { |
+ // At this point, only the animate has happened, but no compositing |
+ // or layout. Use a timeout for the callback so that notifyDone |
+ // can be called inside of it. |
+ window.setTimeout(callback, 0); |
+ }); |
+} |