summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/scrollingcoordinator/non-fast-scrollable-region-transformed-iframe.html
blob: 3db9d602095d9f7f23878feb900b2a1171385f14 (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
<!DOCTYPE html>
<style>
  iframe {
    position: absolute;
    left: 200px;
    top: 200px;
    height: 120px;
    width: 120px;
    padding: 10px;
    border: none;
    transform: scale(2);
  }
</style>

<iframe src="data:text/html;charset=utf-8,<html><body style='width:1000px; height:1000px;'><p style='font-size: 6px'>Should be covered by a green overlay.</p></body></html>"></iframe>
<div id="console"></div>

<script src="../resources/js-test.js"></script>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script src="resources/non-fast-scrollable-region-testing.js"></script>
<script>
  window.jsTestIsAsync = true;
  description('This test ensures non-fast scrollable areas are calculated ' +
              'correctly when a CSS scale transformation is applied.');

  onload = function() {
    runAfterLayoutAndPaint(function(){
      nonFastScrollableRects = window.internals.nonFastScrollableRects(document);
      shouldBe('nonFastScrollableRects.length', '1');
      shouldBeEqualToString('rectToString(nonFastScrollableRects[0])', '[150, 150, 240, 240]');

      drawNonFastScrollableRegionOverlays();

      finishJSTest();
    });
  };
</script>