Backed out changeset 394e4cd341ca (bug 1376892) for frequent failures in browser_aboutStopReload.js. r=backout a=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sun, 16 Jul 2017 10:57:47 +0200
changeset 369080 b4e656e5a996dd385e9af43a4d9e207553377c51
parent 369079 5a5f0b37b51f32b6931ef5e3565613f9189777a0
child 369092 bc3f73d54feeaf0e97b30496574357f05b2d5307
child 369111 0443b103eb84d920b8308fdc90f8b6edebe5c75d
push id32184
push userarchaeopteryx@coole-files.de
push dateSun, 16 Jul 2017 08:58:07 +0000
treeherdermozilla-central@b4e656e5a996 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout, backout
bugs1376892
milestone56.0a1
backs out394e4cd341caa5c111d19905913ba31c0eac4185
first release with
nightly linux32
b4e656e5a996 / 56.0a1 / 20170716100258 / files
nightly linux64
b4e656e5a996 / 56.0a1 / 20170716100258 / files
nightly mac
b4e656e5a996 / 56.0a1 / 20170716100325 / files
nightly win32
b4e656e5a996 / 56.0a1 / 20170716030208 / files
nightly win64
b4e656e5a996 / 56.0a1 / 20170716030208 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 394e4cd341ca (bug 1376892) for frequent failures in browser_aboutStopReload.js. r=backout a=backout MozReview-Commit-ID: AKFJsfmXo5N
browser/base/content/browser.js
browser/base/content/test/about/.eslintrc.js
browser/base/content/test/about/browser.ini
browser/base/content/test/about/browser_aboutStopReload.js
browser/base/moz.build
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -4987,17 +4987,17 @@ var CombinedStopReload = {
       this.animate = Services.prefs.getBoolPref("toolkit.cosmeticAnimations.enabled") &&
                      Services.prefs.getBoolPref("browser.stopReloadAnimation.enabled");
       Services.prefs.addObserver("toolkit.cosmeticAnimations.enabled", this);
       this.stopReloadContainer.addEventListener("animationend", this);
     });
   },
 
   switchToStop(aRequest, aWebProgress) {
-    if (!this._initialized || !this._shouldSwitch(aRequest))
+    if (!this._initialized)
       return;
 
     let shouldAnimate = AppConstants.MOZ_PHOTON_ANIMATIONS &&
                         aRequest instanceof Ci.nsIRequest &&
                         aWebProgress.isTopLevel &&
                         aWebProgress.isLoadingDocument &&
                         this.animate;
 
@@ -5005,18 +5005,17 @@ var CombinedStopReload = {
     if (shouldAnimate)
       this.stopReloadContainer.setAttribute("animate", "true");
     else
       this.stopReloadContainer.removeAttribute("animate");
     this.reload.setAttribute("displaystop", "true");
   },
 
   switchToReload(aRequest, aWebProgress) {
-    if (!this._initialized || !this._shouldSwitch(aRequest) ||
-        !this.reload.hasAttribute("displaystop"))
+    if (!this._initialized)
       return;
 
     let shouldAnimate = AppConstants.MOZ_PHOTON_ANIMATIONS &&
                         aRequest instanceof Ci.nsIRequest &&
                         aWebProgress.isTopLevel &&
                         !aWebProgress.isLoadingDocument &&
                         this.animate;
 
@@ -5043,29 +5042,16 @@ var CombinedStopReload = {
     this.reload.disabled = true;
     this._timer = setTimeout(function(self) {
       self._timer = 0;
       self.reload.disabled = XULBrowserWindow.reloadCommand
                                              .getAttribute("disabled") == "true";
     }, 650, this);
   },
 
-  _shouldSwitch(aRequest) {
-    if (!aRequest ||
-        !aRequest.originalURI ||
-        aRequest.originalURI.spec.startsWith("about:reader"))
-      return true;
-
-    if (aRequest.originalURI.schemeIs("chrome") ||
-        aRequest.originalURI.schemeIs("about"))
-      return false;
-
-    return true;
-  },
-
   _cancelTransition() {
     if (this._timer) {
       clearTimeout(this._timer);
       this._timer = 0;
     }
   }
 };
 
deleted file mode 100644
--- a/browser/base/content/test/about/.eslintrc.js
+++ /dev/null
@@ -1,7 +0,0 @@
-"use strict";
-
-module.exports = {
-  "extends": [
-    "plugin:mozilla/browser-test"
-  ]
-};
deleted file mode 100644
--- a/browser/base/content/test/about/browser.ini
+++ /dev/null
@@ -1,1 +0,0 @@
-[browser_aboutStopReload.js]
deleted file mode 100644
--- a/browser/base/content/test/about/browser_aboutStopReload.js
+++ /dev/null
@@ -1,90 +0,0 @@
-async function waitForNoAnimation(elt) {
-  return BrowserTestUtils.waitForCondition(() => !elt.hasAttribute("animate"));
-}
-
-async function getAnimatePromise(elt) {
-  return BrowserTestUtils.waitForAttribute("animate", elt)
-    .then(() => Assert.ok(true, `${elt.id} should animate`));
-}
-
-function stopReloadMutationCallback() {
-  Assert.ok(false, "stop-reload's animate attribute should not have been mutated");
-}
-
-add_task(async function checkDontShowStopOnNewTab() {
-  let stopReloadContainer = document.getElementById("stop-reload-button");
-  let stopReloadContainerObserver = new MutationObserver(stopReloadMutationCallback);
-
-  await waitForNoAnimation(stopReloadContainer);
-  stopReloadContainerObserver.observe(stopReloadContainer, { attributeFilter: ["animate"]});
-  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
-                                                        opening: "about:home",
-                                                        waitForStateStop: true});
-  await BrowserTestUtils.removeTab(tab);
-
-  Assert.ok(true, "Test finished: stop-reload does not animate when navigating to local URI on new tab");
-  stopReloadContainerObserver.disconnect();
-});
-
-add_task(async function checkDontShowStopFromLocalURI() {
-  let stopReloadContainer = document.getElementById("stop-reload-button");
-  let stopReloadContainerObserver = new MutationObserver(stopReloadMutationCallback);
-
-  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
-                                                        opening: "about:home",
-                                                        waitForStateStop: true});
-  await waitForNoAnimation(stopReloadContainer);
-  stopReloadContainerObserver.observe(stopReloadContainer, { attributeFilter: ["animate"]});
-  await BrowserTestUtils.loadURI(tab.linkedBrowser, "about:mozilla");
-  await BrowserTestUtils.removeTab(tab);
-
-  Assert.ok(true, "Test finished: stop-reload does not animate when navigating between local URIs");
-  stopReloadContainerObserver.disconnect();
-});
-
-add_task(async function checkDontShowStopFromNonLocalURI() {
-  let stopReloadContainer = document.getElementById("stop-reload-button");
-  let stopReloadContainerObserver = new MutationObserver(stopReloadMutationCallback);
-
-  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
-                                                        opening: "https://example.com",
-                                                        waitForStateStop: true});
-  await waitForNoAnimation(stopReloadContainer);
-  stopReloadContainerObserver.observe(stopReloadContainer, { attributeFilter: ["animate"]});
-  await BrowserTestUtils.loadURI(tab.linkedBrowser, "about:mozilla");
-  await BrowserTestUtils.removeTab(tab);
-
-  Assert.ok(true, "Test finished: stop-reload does not animate when navigating to local URI from non-local URI");
-  stopReloadContainerObserver.disconnect();
-});
-
-add_task(async function checkDoShowStopOnNewTab() {
-  let stopReloadContainer = document.getElementById("stop-reload-button");
-  let animatePromise = getAnimatePromise(stopReloadContainer);
-
-  await waitForNoAnimation(stopReloadContainer);
-  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
-                                                        opening: "https://example.com",
-                                                        waitForStateStop: true});
-  await animatePromise;
-  await waitForNoAnimation(stopReloadContainer);
-  await BrowserTestUtils.removeTab(tab);
-
-  info("Test finished: stop-reload animates when navigating to non-local URI on new tab");
-});
-
-add_task(async function checkDoShowStopFromLocalURI() {
-  let stopReloadContainer = document.getElementById("stop-reload-button");
-
-  await waitForNoAnimation(stopReloadContainer);
-  let tab = await BrowserTestUtils.openNewForegroundTab({gBrowser,
-                                                        opening: "about:home",
-                                                        waitForStateStop: true});
-  let animatePromise = getAnimatePromise(stopReloadContainer);
-  BrowserTestUtils.loadURI(tab.linkedBrowser, "https://example.com");
-  await animatePromise;
-  await waitForNoAnimation(stopReloadContainer);
-  await BrowserTestUtils.removeTab(tab);
-
-  info("Test finished: stop-reload animates when navigating local URI from non-local URI");
-});
--- a/browser/base/moz.build
+++ b/browser/base/moz.build
@@ -10,17 +10,16 @@ MOCHITEST_MANIFESTS += [
     'content/test/general/mochitest.ini',
 ]
 
 MOCHITEST_CHROME_MANIFESTS += [
     'content/test/chrome/chrome.ini',
 ]
 
 BROWSER_CHROME_MANIFESTS += [
-    'content/test/about/browser.ini',
     'content/test/alerts/browser.ini',
     'content/test/captivePortal/browser.ini',
     'content/test/contextMenu/browser.ini',
     'content/test/forms/browser.ini',
     'content/test/general/browser.ini',
     'content/test/newtab/browser.ini',
     'content/test/pageinfo/browser.ini',
     'content/test/performance/browser.ini',