Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Unified Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary scope Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..9b45026844bddfe3bc2ad31a7143a3f4f89467d2
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/request-animation-frame.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<!--
+Tests that requestAnimationFrame runs on the compositor worker.
+-->
+<script>
+window.jsTestIsAsync = true;
jbroman 2016/04/20 19:24:51 This needn't be in a script tag above js-test.js.
flackr 2016/04/25 14:06:27 Done, thanks for the test pointers - it looks much
+</script>
+<script src="../../../../resources/js-test.js"></script>
+<script>
+if (window.testRunner)
+ testRunner.dumpAsText(true);
+if (window.internals) {
+ internals.settings.setCompositorWorkerEnabled(true);
+}
+
+var cw;
+onload = function() {
jbroman 2016/04/20 19:24:50 Do you need to wait for onload? If so, why?
flackr 2016/04/25 14:06:27 No, removed.
+ cw = new CompositorWorker('resources/request-animation-frame.js');
+ cw.onmessage = finishTest;
+ cw.postMessage('');
+}
+
+function finishTest(e) {
+ document.getElementById('result').textContent = e.data;
+ if (window.testRunner)
jbroman 2016/04/20 19:24:50 It's weird to use the js-test way of marking the t
flackr 2016/04/25 14:06:27 Done. I also made it record the time before raf wa
+ testRunner.notifyDone();
+}
+</script>
+<div id="result"></div>

Powered by Google App Engine
This is Rietveld 408576698