gfx/layers/apz/test/mochitest/helper_wide_crossorigin_iframe.html
author Robert Longson <longsonr@gmail.com>
Sat, 04 Feb 2023 15:41:48 +0000
changeset 651752 40237e7707f1928c84d09cdd2f1fd018a74ea784
parent 622280 2e4bcee7402a8a7daed611c07ef35fd62aba99fe
permissions -rw-r--r--
Bug 1814872 - Fix degenerate radial gradient handling r=emilio This is a change from SVG 1.1 where we only had to check for r=0 because fr did not exist. The SVG 2 behaviour was clarified in https://github.com/w3c/svgwg/issues/648 Differential Revision: https://phabricator.services.mozilla.com/D168783

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Test cross origin fission iframes get displayport that covers whole width</title>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<script src="/tests/SimpleTest/paint_listener.js"></script>
<script src="apz_test_utils.js"></script>
<script src="apz_test_native_event_utils.js"></script>
</head>
<body>
  <iframe id="iframe" style="width:700px; height:150px; border:2px solid blue;"></iframe>
<script>

  window.addEventListener("message", event => {
    if (event.data == "wereDone") {
      subtestDone();
    } else if (event.data.x != undefined && event.data.y != undefined && event.data.width != undefined && event.data.height != undefined) {
      info("event.data " + event.data.x +  " " + event.data.y +  " " + event.data.width +  " " + event.data.height);
      // 683 = 700 width of iframe minus maximum width of scrollbars seen on try
      ok(event.data.width >= 683, "dp is wide enough");
    }
  });

  function test() {
    document.getElementById("iframe").setAttribute("src", "http://example.org/tests/gfx/layers/apz/test/mochitest/helper_wide_crossorigin_iframe_child.html");
  }

  waitUntilApzStable().then(test);

</script>
</body>
</html>