layout/reftests/bugs/599113-1.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/bugs/599113-1.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +<html class="reftest-wait">
     1.5 +<head>
     1.6 +<script>
     1.7 +  function doTest() {
     1.8 +    window.scrollTo(0,101);
     1.9 +    // make sure we serve the invalidate the scroll caused, so the invalidate
    1.10 +    // doesn't get served later in our test (which would just make us pass when
    1.11 +    // we should actually fail)
    1.12 +    setTimeout("continueTest();", 0);
    1.13 +  }
    1.14 +  function continueTest() {
    1.15 +    document.getElementById("x").style.background = "blue";
    1.16 +    // make sure the invalidate for that change happens now, while we are
    1.17 +    // scrolled down
    1.18 +    document.documentElement.offsetLeft;
    1.19 +    setTimeout("finishTest();", 0);
    1.20 +  }
    1.21 +  function finishTest() {
    1.22 +    window.scrollTo(0,0);
    1.23 +    document.documentElement.removeAttribute('class');
    1.24 +  }
    1.25 +  document.addEventListener("MozReftestInvalidate", doTest, false);
    1.26 +</script>
    1.27 +</head>
    1.28 +<body style="overflow: hidden;">
    1.29 +<div id="x" style="position: absolute; left: 0px; top: 0px; width: 100px; height: 100px; background: red;"></div>
    1.30 +<div style="height: 10000px;"></div>
    1.31 +</body>
    1.32 +</html>

mercurial