Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html |
| diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html b/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e58eb894d600d7d0c758962d802308d447bacc7e |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/compositing/overflow/composited-scroll-overlap-test.html |
| @@ -0,0 +1,35 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +div::-webkit-scrollbar { |
| + display: none; |
| +} |
| +</style> |
| +<div id=scroller style="width: 400px; height: 400px; overflow-y: scroll; will-change: transform"> |
| + <div style="height: 400px"></div> |
| + <div id=overlap style="backface-visibility: hidden; width: 100px; height: 100px; background-color: red"></div> |
| + <div id=target style="position: relative; top: -50px; left: 50px; width: 100px; height: 100px; background-color: green"></div> |
| +</div> |
| +<div id="notscrolled" style="position: relative; width: 50px; height: 300px; background: lightgray"></div> |
| +<pre id=output></pre> |
| +<script> |
| +if (testRunner) { |
| + testRunner.waitUntilDone(); |
| + testRunner.dumpAsText(); |
| +} |
| +// Test passes if 'target' (green) is on top of 'overlap' (red). |
| +// The actual test output is a layerization where 'overlap' has a composited layer, |
| +// and 'target' does, but 'notscrolled'. 'target' has a composited layer because |
| +// it overlaps 'overlap'. 'notscrolled' does not have one because it does not |
| +// intersect the scroller and is outside of it. |
| +onload = function() { |
| + requestAnimationFrame(function() { |
| + requestAnimationFrame(function() { |
| + scroller.scrollTop = 400; |
| + if (internals) |
| + output.innerHTML = internals.layerTreeAsText(document); |
|
Ian Vollick
2016/10/19 20:16:31
nit: to avoid text diff churn, can you check the o
chrishtr
2016/10/19 21:44:51
Done.
|
| + if (testRunner) |
| + testRunner.notifyDone(); |
| + }); |
| + }); |
| +}; |
| +</script> |