Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html |
| diff --git a/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ca55b2c4a8184816d955eaade226057ad5327f32 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/virtual/threaded/fast/compositorworker/root-scroller.html |
| @@ -0,0 +1,51 @@ |
| +<!DOCTYPE html> |
| + |
| +<style> |
| +body { |
| + width: 100px; |
| + height: 100px; |
| + overflow: scroll; |
|
flackr
2017/03/01 16:31:26
Why do we need to apply overflow: scroll / limit t
|
| +} |
| + |
| +#green { |
| + width: 1000px; |
| + height: 1000px; |
| + |
| + position: relative; |
| + left: 500px; |
| + top: 500px; |
| + |
| + background-color: #00ff00; |
| +} |
| +</style> |
| + |
| +<body> |
| + <div id="green"></div> |
| +</body> |
| + |
| +<script src='../../../../resources/testharness.js'></script> |
| +<script src='../../../../resources/testharnessreport.js'></script> |
| + |
| +<script> |
| +if (window.internals) { |
| + internals.settings.setCompositorWorkerEnabled(true); |
| + internals.settings.setPreferCompositingToLCDTextEnabled(true); |
|
flackr
2017/03/01 16:31:26
The root scroller is always composited isn't it? I
|
| +} |
| + |
| +async_test(function(test){ |
| + var cw = new CompositorWorker('resources/root-scroller.js'); |
| + cw.onmessage = test.step_func(function(){ |
| + requestAnimationFrame(test.step_func(function() { |
| + assert_equals(document.scrollingElement.scrollTop, 500); |
| + assert_equals(document.scrollingElement.scrollLeft, 500); |
| + test.done(); |
| + })); |
| + }); |
| + |
| + cw.postMessage({'proxy': new CompositorProxy(document.scrollingElement, |
| + ['scrollLeft', 'scrollTop'])}); |
| +}, 'Check that mutating scroll offset of a proxied document.scrollingElement scrolls the root layer'); |
| + |
| + |
| + |
|
flackr
2017/03/01 16:31:26
nit: collapse newlines
|
| +</script> |