Bug 1395305 - Turn Activity Stream off for tests in browser/components/migration/tests/browser/
MozReview-Commit-ID: 7zlHRGQqEZH
--- a/browser/components/migration/tests/browser/browser.ini
+++ b/browser/components/migration/tests/browser/browser.ini
@@ -1,3 +1,8 @@
+[DEFAULT]
+prefs =
+ browser.newtabpage.activity-stream.enabled=false
+ browser.newtabpage.preload=false
+
[browser_undo_notification.js]
[browser_undo_notification_wording.js]
[browser_undo_notification_multiple_dismissal.js]
--- a/browser/components/migration/tests/browser/browser_undo_notification.js
+++ b/browser/components/migration/tests/browser/browser_undo_notification.js
@@ -14,25 +14,16 @@ const kExpectedNotificationId = "automig
add_task(async function autoMigrationUndoNotificationShows() {
let getNotification = browser =>
gBrowser.getNotificationBox(browser).getNotificationWithValue(kExpectedNotificationId);
scope.AutoMigrate.canUndo = () => true;
let undoCalled;
scope.AutoMigrate.undo = () => { undoCalled = true };
- // Disable preloaded activity-stream about:newtab for this test to only run on
- // the tiles version
- await SpecialPowers.pushPrefEnv({set: [
- ["browser.newtabpage.activity-stream.enabled", false],
- ["browser.newtab.preload", false]
- ]});
- // Open and close about:newtab to remove any preloaded activity-stream version
- await BrowserTestUtils.removeTab(await BrowserTestUtils.openNewForegroundTab(gBrowser));
-
for (let url of ["about:newtab", "about:home"]) {
undoCalled = false;
// Can't use pushPrefEnv because of bug 1323779
Services.prefs.setCharPref("browser.migrate.automigrate.browser", "someunknownbrowser");
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, url, false);
let browser = tab.linkedBrowser;
if (!getNotification(browser)) {
info(`Notification for ${url} not immediately present, waiting for it.`);