gfx/layers/apz/test/mochitest/helper_hittest_subframe_float.html
author Botond Ballo <botond@mozilla.com>
Wed, 28 Mar 2018 14:22:54 -0400
changeset 773960 074ba63d6c4d9a69393cce691988697def556818
parent 755497 f7c315627ca4a8b009a94369a3d61c96d0ffe6f6
permissions -rw-r--r--
Bug 1447131 - Mochitest for hit-testing over backface-visibility:hidden element. r=kats MozReview-Commit-ID: EeQlvluPQD1

<!DOCTYPE HTML>
<html>
<head>
  <title>APZ hit-testing with floated subframe</title>
  <script type="application/javascript" src="apz_test_utils.js"></script>
  <script type="application/javascript" src="apz_test_native_event_utils.js"></script>
  <script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
  <meta name="viewport" content="width=device-width"/>
  <style>
    #float {
      float: left;
    }
    #subframe {
      overflow: scroll;
      height: 300px;
    }
    #subframe-content {
      width: 300px;
      height: 2000px;
      background: cyan;
    }
    #make-root-scrollable {
      height: 5000px;
    }
  </style>
</head>
<body>
  <div id="float">
    <div id="subframe">
      <div id="subframe-content"></div>
    </div>
  </div>
  <div id="make-root-scrollable"></div>
</body>
<script type="application/javascript">

function* test(testDriver) {
  var utils = getHitTestConfig().utils;

  hitTestScrollbar({
    element: document.getElementById('subframe'),
    directions: { vertical: true },
    expectedScrollId: utils.getViewId(document.scrollingElement),
    trackLocation: ScrollbarTrackLocation.START,
    expectThumb: true,
    layerState: LayerState.INACTIVE
  });

  subtestDone();
}

waitUntilApzStable().then(runContinuation(test));

</script>
</html>