Remove testRunner.display() from most compositing/ tests

BUG=345027

Review URL: https://codereview.chromium.org/181653006

git-svn-id: svn://svn.chromium.org/blink/trunk@168066 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/third_party/WebKit/LayoutTests/resources/run-after-display.js b/third_party/WebKit/LayoutTests/resources/run-after-display.js
new file mode 100644
index 0000000..c42de0fa
--- /dev/null
+++ b/third_party/WebKit/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);
+    });
+}