Bug 1395281 - Fix perma-red in browser_aboutHome_wrapsCorrectly.js when Activity Stream is enabled for about:home draft
authorUrsula Sarracini
Wed, 30 Aug 2017 14:59:20 -0400
changeset 656124 626e907432f653223c6655b5ef60f3333a11f1c2
parent 655774 ab2d700fda2b4934d24227216972dce9fac19b74
child 729017 7d6f113e16cabfcc66c62344c2bbe5e5b794cb1f
push id77074
push userusarracini@mozilla.com
push dateWed, 30 Aug 2017 19:00:42 +0000
bugs1395281
milestone57.0a1
Bug 1395281 - Fix perma-red in browser_aboutHome_wrapsCorrectly.js when Activity Stream is enabled for about:home MozReview-Commit-ID: D85bXwro80e
browser/base/content/test/about/browser_aboutHome_wrapsCorrectly.js
--- a/browser/base/content/test/about/browser_aboutHome_wrapsCorrectly.js
+++ b/browser/base/content/test/about/browser_aboutHome_wrapsCorrectly.js
@@ -1,9 +1,14 @@
 add_task(async function() {
+  // When about:home is set to Activity Stream, there are no 'narrow' attributes
+  // therefore for this test, we want to ensure we're using the original about:home
+  await SpecialPowers.pushPrefEnv({set: [
+    ["browser.newtabpage.activity-stream.aboutHome.enabled", false]
+  ]});
   let newWindow = await BrowserTestUtils.openNewBrowserWindow();
 
   let resizedPromise = BrowserTestUtils.waitForEvent(newWindow, "resize");
   newWindow.resizeTo(300, 300);
   await resizedPromise;
 
   await BrowserTestUtils.openNewForegroundTab(newWindow.gBrowser, "about:home");