Bug 1137952 - Call mozRequestAnimationFrame on the right window. r=mstange, a=test-only
authorKartikaya Gupta <kgupta@mozilla.com>
Mon, 02 Mar 2015 17:37:33 -0500
changeset 249042 d29e62045cc8b3a1c629eae17bc39f9ccbb80cf5
parent 249041 64549e948fc81c4b7ef8d678030bc763c49f6810
child 249043 c7d212eecc8ea827ff22da89d0ed005204c93256
push id970
push userjryans@gmail.com
push dateTue, 10 Mar 2015 15:54:18 +0000
reviewersmstange, test-only
bugs1137952
milestone37.0
Bug 1137952 - Call mozRequestAnimationFrame on the right window. r=mstange, a=test-only
dom/events/test/test_bug607464.html
--- a/dom/events/test/test_bug607464.html
+++ b/dom/events/test/test_bug607464.html
@@ -50,20 +50,20 @@ function runTest() {
     '</div>', '_blank', 'width=300,height=300');
   SimpleTest.waitForFocus(function () {
     var scrollbox = win.document.getElementById("scrollbox");
     let scrollTopBefore = scrollbox.scrollTop;
 
     scrollDown15PxWithPixelScrolling(scrollbox);
 
     // wait for the next refresh driver run
-    window.mozRequestAnimationFrame(function() {
+    win.mozRequestAnimationFrame(function() {
       // actually, wait for the next one before checking results, since
       // scrolling might not be flushed until after this code has run
-      window.mozRequestAnimationFrame(function() {
+      win.mozRequestAnimationFrame(function() {
         is(scrollbox.scrollTop, scrollTopBefore + 15,
            "Pixel scrolling should have finished after one refresh driver iteration. " +
            "We shouldn't be scrolling smoothly, even though the pref is set.");
         win.close();
         clearPrefs();
         SimpleTest.finish();
       });
     });