Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / scrolling / background-paint-non-composited-scrolled.html
blob12d26a12ccaf2db9bb089ee0c71e471a32ecbdc1
1 <!DOCTYPE html>
2 <script src="../../resources/run-after-layout-and-paint.js"></script>
3 <style>
4 #box, #box-unchanged {
5 margin-left: 300px;
6 width: 50px;
7 height: 50px;
9 #box {
10 margin-top: 150px;
11 background-color: yellow;
13 #box-unchanged {
14 background-color: blue;
16 #container {
17 width: 500px;
18 height: 500px;
19 overflow: scroll;
21 </style>
22 Tests invalidation and painting of a box changing background while composited scrolled.
23 <div id="container">
24 <div id="box"></div>
25 <div id="box-unchanged"></div>
26 <div style="height: 4000px"></div>
27 </div>
28 <script>
30 if (window.testRunner) {
31 testRunner.dumpAsTextWithPixelResults();
32 testRunner.waitUntilDone();
35 runAfterLayoutAndPaint(function() {
36 var container = document.querySelector('#container');
37 var box = document.querySelector("#box");
38 container.scrollTop = 180;
39 box.style.backgroundColor = "green";
40 runAfterLayoutAndPaint(function() {
41 container.scrollTop = 0;
42 if (window.testRunner)
43 testRunner.notifyDone();
44 });
45 });
47 </script>