Bug 1299653 - Don't have the page scrolling when the tab is closed. r=jaws
authorEitan Isaacson <eitan@monotonous.org>
Sat, 03 Sep 2016 14:14:29 -0700
changeset 312874 4266dca3ab7df795abc8865beb0aacc5884ffbfc
parent 312873 98b0e9b8821221843b17a1e191fae13a29e24018
child 312875 a9e15f6064208d65164c60384d763741dcc708fa
push id30663
push usercbook@mozilla.com
push dateWed, 07 Sep 2016 15:12:31 +0000
treeherdermozilla-central@3d0b41fdd93b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1299653
milestone51.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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);
   });
 });