Bug 1299653 - Don't have the page scrolling when the tab is closed. r=jaws a=testonly
authorEitan Isaacson <eitan@monotonous.org>
Sat, 03 Sep 2016 14:14:29 -0700
changeset 350132 170d7f1c6661c703ec4012cd49fea5d979ebd993
parent 350131 668184fd0505978264e6049325f61b44e433af6d
child 350133 d9f44ae5701cb58d2cdb3ae5f5dd6bb34697baec
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws, testonly
bugs1299653
milestone50.0a2
Bug 1299653 - Don't have the page scrolling when the tab is closed. r=jaws a=testonly MozReview-Commit-ID: DlmXfQQttRr
toolkit/components/narrate/test/browser_narrate.js
--- a/toolkit/components/narrate/test/browser_narrate.js
+++ b/toolkit/components/narrate/test/browser_narrate.js
@@ -115,13 +115,16 @@ add_task(function* testNarrate() {
     // stop.
     do {
       promiseEvent = Promise.race([
         ContentTaskUtils.waitForEvent(content, "paragraphstart"),
         ContentTaskUtils.waitForEvent(content, "paragraphsdone")]);
       $(NarrateTestUtils.FORWARD).click();
     } while ((yield promiseEvent).type == "paragraphstart");
 
+    // This is to make sure we are not actively scrolling when the tab closes.
+    content.scroll(0, 0);
+
     yield ContentTaskUtils.waitForCondition(
       () => !$(NarrateTestUtils.STOP), "transitioned to stopped state");
     NarrateTestUtils.isStoppedState(content, ok);
   });
 });