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

Side by Side 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: Bring up oilpan support during compositor worker creation and oilpan the compositor mutator and pro… Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../../resources/js-test.js"></script>
3 <script>
4 var jsTestIsAsync = true;
5 description('Tests that requestAnimationFrame is invoked with correct timestamp on CompositorWorker.');
6 if (window.internals)
7 internals.settings.setCompositorWorkerEnabled(true);
8
9 var cw = new CompositorWorker('resources/request-animation-frame.js');
10 var startTime = performance.now();
11 var rafTime;
12 var endTime;
13 cw.postMessage('');
jbroman 2016/04/29 19:42:22 you can remove this postMessage, now that the work
flackr 2016/05/03 22:24:54 Oops, forgot to remove it, thanks. Removed.
14 cw.onmessage = function(e) {
15 rafTime = e.data;
16 endTime = performance.now();
17 shouldBe('startTime <= rafTime', 'true');
jbroman 2016/04/29 19:42:22 nit: shouldBeGreaterThanOrEqual('rafTime', 'startT
flackr 2016/05/03 22:24:54 Done.
18 shouldBe('rafTime <= endTime', 'true');
19 testPassed('Received reply from CompositorWorker.');
20 finishJSTest();
21 }
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698