Bug 599113. Add a reftest. a=test

This commit is contained in:
Timothy Nikkel 2010-10-14 20:03:46 -05:00
parent 9fa3e05ad4
commit d7571d83ca
3 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,6 @@
<html>
<body style="overflow: hidden;">
<div style="position: absolute; left: 0; top: 0; width: 100px; height: 100px; background: blue;"></div>
<div style="height: 10000px;"></div>
</body>
</html>

View File

@ -0,0 +1,29 @@
<html class="reftest-wait">
<head>
<script>
function doTest() {
window.scrollTo(0,101);
// make sure we serve the invalidate the scroll caused, so the invalidate
// doesn't get served later in our test (which would just make us pass when
// we should actually fail)
setTimeout("continueTest();", 0);
}
function continueTest() {
document.getElementById("x").style.background = "blue";
// make sure the invalidate for that change happens now, while we are
// scrolled down
document.documentElement.offsetLeft;
setTimeout("finishTest();", 0);
}
function finishTest() {
window.scrollTo(0,0);
document.documentElement.removeAttribute('class');
}
document.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</head>
<body style="overflow: hidden;">
<div id="x" style="position: absolute; left: 0px; top: 0px; width: 100px; height: 100px; background: red;"></div>
<div style="height: 10000px;"></div>
</body>
</html>

View File

@ -1513,6 +1513,7 @@ asserts(0-1) == 582146-1.html about:blank
== 594624-1.html 594624-1-ref.html
== 594737-1.html 594737-1-ref.html
== 597721-1.html 597721-1-ref.html
== 599113-1.html 599113-1-ref.html
fails-if(!haveTestPlugin) == 599476.html 599476-ref.html
== 600045-1.html 600045-1-ref.html
== 600803-1.html 600803-1-ref.html