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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/basic-plumbing-worker-to-main.html

Issue 2041193005: [compositorworker] compositor proxy mutation updates underlying layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@compositor-worker-upstream-registration
Patch Set: Use RAII pattern Created 4 years, 6 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 <style>
3 #box {
4 width: 100px;
5 height: 100px;
6 overflow: scroll;
7 }
8
9 #scrolled {
10 background: white;
11 width: 300px;
12 height: 300px;
13 }
14 </style>
15
16 <div id="box">
17 <div id="scrolled"></div>
18 </div>
19
20 <script src="../../../../resources/testharness.js"></script>
21 <script src="../../../../resources/testharnessreport.js"></script>
22 <script>
23 if (window.internals)
24 internals.settings.setCompositorWorkerEnabled(true);
25
26 var test = async_test('Tests that a change from the worker thread is received on the main thread.');
27 test.step(function() {
28 var worker = new CompositorWorker('resources/basic-plumbing-worker-to-main.js' );
29 worker.onmessage = test.step_func(function() {
30 // Wait until the next frame to ensure we have received the update from comp ositor worker.
31 requestAnimationFrame(test.step_func(function() {
32 var box = document.getElementById('box');
33 assert_equals(getComputedStyle(box).opacity, '0.5');
34 assert_equals(box.scrollLeft, 10);
35 assert_equals(box.scrollTop, 20);
36 assert_equals(getComputedStyle(box).transform, 'matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 30, 0, 0, 2)');
37
38 test.done();
39 }));
40 });
41
42 var keys = ['opacity', 'transform', 'scrollTop', 'scrollLeft'];
43 worker.postMessage({'proxy': new CompositorProxy(document.getElementById('box' ), keys)});
44 });
45 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698