1 var topElements = document.getElementsByClassName("scrollTop");
2 if (!topElements.length) {
3 topElements = [document.documentElement];
12 for (var i = 0; i < topElements.length; ++i) {
13 var e = topElements[i];
15 if (e.scrollTop != d) {
16 document.documentElement.textContent =
17 "Scrolling failed on " + e.tagName + " element, " +
18 "tried to scroll to " + d + ", got " + e.scrollTop +
19 " (Random number: " + Math.random() + ")";
25 if (document.location.search == '?ref') {
27 } else if (document.location.search == '?up') {
29 document.documentElement.setAttribute("class", "reftest-wait");
30 window.addEventListener("MozReftestInvalidate", function() {
31 document.documentElement.removeAttribute("class");
36 document.documentElement.setAttribute("class", "reftest-wait");
37 window.addEventListener("MozReftestInvalidate", function() {
38 document.documentElement.removeAttribute("class");