layout/reftests/selection/invalidation-2b.html
author Chris H-C <chutten@mozilla.com>
Fri, 22 Mar 2019 17:31:02 +0000
changeset 465740 c3d4eb5b3b2223aa6734bb8c2d39457ee768fc3c
parent 361491 c5f7de87eceb7462a0461f644f314a34a473aa72
permissions -rw-r--r--
Bug 1536805 - Document Origin Telemetry r=janerik Differential Revision: https://phabricator.services.mozilla.com/D24263

<!DOCTYPE html>
<html class="reftest-wait">
<head>
<body>
<p id="first">f<span>o</span>o</p>
<p id="second">bar</p>
<script>
document.body.offsetTop;
var p1 = document.getElementById("first");
var p2 = document.getElementById("second");
var selection = window.getSelection();
selection.setBaseAndExtent(p1.firstChild, 1, p2.firstChild, 2);

function doTest() {
  selection.collapse(p2.firstChild, 3);
  document.documentElement.removeAttribute('class');
}
document.addEventListener("MozReftestInvalidate", doTest);
</script>
</body>
</html>