Bug 1299653 - Don't have the page scrolling when the tab is closed. r?jaws draft
authorEitan Isaacson <eitan@monotonous.org>
Sat, 03 Sep 2016 14:14:29 -0700
changeset 409635 aa3c85172abe5d2069a3512cc5814380033921ad
parent 409497 d0830980ffdb36a10855d02a588b4869cad6707e
child 530370 961937282001bfa756dc142f4e37c12c6b70fbea
push id28501
push userbmo:eitan@monotonous.org
push dateSat, 03 Sep 2016 21:16:36 +0000
reviewersjaws
bugs1299653
milestone51.0a1
Bug 1299653 - Don't have the page scrolling when the tab is closed. r?jaws 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
@@ -122,13 +122,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);
   });
 });