gfx/layers/apz/test/mochitest/helper_hittest_float_bug1434846.html
author Cosmin Sabou <csabou@mozilla.com>
Sun, 05 Feb 2023 19:37:33 +0000
changeset 651812 d8601249f1eb8c52c742b0c19c9ca0fa8f2e31fe
parent 561528 b81ffe0df96df03bd6640d8f10a55658d8f54020
permissions -rw-r--r--
Bug 1806090 - temporarily disable browser_quickactions.js on linux for frequent failures. r=intermittent-reviewers,MasterWayZ Differential Revision: https://phabricator.services.mozilla.com/D168909

<!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 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">

async function test() {
  var utils = getHitTestConfig().utils;

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

waitUntilApzStable()
.then(test)
.then(subtestDone, subtestFailed);

</script>
</html>