Index: LayoutTests/compositing/layer-creation/should-invoke-deferred-compositing.html |
diff --git a/LayoutTests/compositing/layer-creation/should-invoke-deferred-compositing.html b/LayoutTests/compositing/layer-creation/should-invoke-deferred-compositing.html |
index 75225eac11aaa791befa55fb3f5e26b59b56af76..29292bd17c1e50273873fb954a0de273eca098ec 100644 |
--- a/LayoutTests/compositing/layer-creation/should-invoke-deferred-compositing.html |
+++ b/LayoutTests/compositing/layer-creation/should-invoke-deferred-compositing.html |
@@ -11,6 +11,7 @@ |
<html> |
<head> |
+<script src="../../resources/run-after-display.js"></script> |
<style> |
.composited { |
@@ -62,15 +63,18 @@ canvas { |
return; |
} |
- testRunner.display(); |
+ testRunner.waitUntilDone(); |
- // This should initiate a compositor frame via scheduleAnimation(). |
- addCanvasToTree(); |
+ runAfterDisplay(function() { |
+ // This should initiate a compositor frame via scheduleAnimation(). |
+ addCanvasToTree(); |
- if (window.internals.isCompositorFramePending(document)) |
- document.getElementById("result").innerHTML = "PASS - did schedule animation"; |
- else |
- document.getElementById("result").innerHTML = "FAIL - did not schedule animation"; |
+ if (window.internals.isCompositorFramePending(document)) |
+ document.getElementById("result").innerHTML = "PASS - did schedule animation"; |
+ else |
+ document.getElementById("result").innerHTML = "FAIL - did not schedule animation"; |
+ testRunner.notifyDone(); |
+ }); |
} |
</script> |