layout/reftests/selection/extend-1d.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/selection/extend-1d.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,20 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<body style="white-space:pre">0123456789
     1.8 +<script>
     1.9 +document.body.offsetTop;
    1.10 +// Test anchor < newfocus = focus
    1.11 +var t = document.body.firstChild;
    1.12 +var sel = window.getSelection();
    1.13 +sel.collapse(t, 2); // anchor
    1.14 +sel.extend(t, 8);   // focus
    1.15 +
    1.16 +function doTest() {
    1.17 +  sel.extend(t, 8); // newfocus
    1.18 +  document.documentElement.removeAttribute('class');
    1.19 +}
    1.20 +document.addEventListener("MozReftestInvalidate", doTest, false);
    1.21 +</script>
    1.22 +</body>
    1.23 +</html>

mercurial