Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7a2b6997a6d5c29966996e3b6c329c0dfc9e5149 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html |
@@ -0,0 +1,21 @@ |
+<!DOCTYPE html> |
+<script src="../../../../resources/js-test.js"></script> |
+<script> |
+var jsTestIsAsync = true; |
+description('Tests that requestAnimationFrame is invoked with correct timestamp on CompositorWorker.'); |
+if (window.internals) |
+ internals.settings.setCompositorWorkerEnabled(true); |
+ |
+var cw = new CompositorWorker('resources/request-animation-frame.js'); |
+var startTime = performance.now(); |
+var rafTime; |
+var endTime; |
+cw.onmessage = function(e) { |
+ rafTime = e.data; |
+ endTime = performance.now(); |
+ shouldBeGreaterThanOrEqual('rafTime', 'startTime'); |
+ shouldBeGreaterThanOrEqual('endTime', 'rafTime'); |
+ testPassed('Received reply from CompositorWorker.'); |
+ finishJSTest(); |
+} |
+</script> |