summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/iframes/resources/scrollgrandchild-inner.html
blob: 341270f1fecaf412a6c0b141f0a1e3f27c57977f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<html>
<head>
  <script src="../../../resources/run-after-layout-and-paint.js"></script>
  <style>
    body {
      height: 1000px;
    }
    #redbox {
      background-color: red;
      position: absolute;
      top: 50px;
      left: 50px;
      height: 50px;
      width: 50px;
    }
    #greenbox {
      background-color: green;
      position: absolute;
      top: 450px;
      left: 50px;
      height: 50px;
      width: 50px;
    }
  </style>
  <script>
    if (window.internals)
      window.internals.settings.setMockScrollbarsEnabled(true);
    if (window.testRunner) {
      testRunner.dumpAsTextWithPixelResults();
      testRunner.waitUntilDone();
    }

    function doTest()
    {
      runAfterLayoutAndPaint(function() {
        // Scroll red box off screen and scroll green box into same place.
        window.scrollTo(0, 400);
        if (window.testRunner)
          testRunner.notifyDone();
      });
    }

    window.addEventListener('load', doTest, false);
  </script>
</head>
<body>
  <div id="redbox"></div>
  <div id="greenbox"></div>
</body>
</html>