Backed out 2 changesets (bug 1643578) for Browser-chrome failures in browser_navigate_home_focuses_addressbar.js. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Thu, 23 Jul 2020 22:34:57 +0300
changeset 541818 7590205c21846121ab0c0a7e1158ac7b555c9cba
parent 541817 074ba1c126005895f0520596c3f1d237882eb7df
child 541819 63f8e5c9497d3e27af04c5d7cff61feab714f111
push id37633
push userccoroiu@mozilla.com
push dateFri, 24 Jul 2020 09:32:06 +0000
treeherdermozilla-central@141543043270 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1643578
milestone80.0a1
backs oute87edc47ce4966ef9cf2df591dfa8a0d66f57116
5a1183eb910737e2141922797bab757b25332a77
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
Backed out 2 changesets (bug 1643578) for Browser-chrome failures in browser_navigate_home_focuses_addressbar.js. CLOSED TREE Backed out changeset e87edc47ce49 (bug 1643578) Backed out changeset 5a1183eb9107 (bug 1643578)
browser/base/content/test/tabs/browser_navigate_home_focuses_addressbar.js
--- a/browser/base/content/test/tabs/browser_navigate_home_focuses_addressbar.js
+++ b/browser/base/content/test/tabs/browser_navigate_home_focuses_addressbar.js
@@ -1,77 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
 /* vim: set ft=javascript ts=2 et sw=2 tw=80: */
 
 const TEST_HTTP = httpURL("dummy_page.html");
 
-async function doNavigateHome(expectedURL, expectFocused, waitForCondition) {
+// Test for Bug 1634272
+add_task(async function() {
   await BrowserTestUtils.withNewTab(TEST_HTTP, async function(browser) {
     info("Tab ready");
 
     document.getElementById("home-button").click();
     await BrowserTestUtils.browserLoaded(browser, false, HomePage.get());
-
-    if (waitForCondition) {
-      await waitForCondition(browser);
-    }
-
-    is(gURLBar.value, expectedURL, "URL bar set correctly");
-    is(
-      gURLBar.focused,
-      expectFocused,
-      "URL bar should" + (expectFocused ? "" : " not") + " be focused"
-    );
+    is(gURLBar.value, "", "URL bar should be empty");
+    ok(gURLBar.focused, "URL bar should be focused");
   });
-}
-
-// Test for Bug 1634272
-add_task(async function testNavHomeDefault() {
-  await doNavigateHome("", true);
-});
-
-add_task(async function testNavHomeHTTP() {
-  await SpecialPowers.pushPrefEnv({
-    set: [["browser.startup.homepage", "http://example.com/"]],
-  });
-
-  // We don't focus the URL bar when the home page is a website.
-  await doNavigateHome("example.com", false);
-
-  await SpecialPowers.popPrefEnv();
 });
-
-// Test for Bug 1643578
-add_task(async function testNavHomeExtension() {
-  // Mostly copied from browser_ext_chrome_settings_overrides_home.js.
-  let extension = ExtensionTestUtils.loadExtension({
-    manifest: {
-      applications: {
-        gecko: { id: "extension@mochi.test" },
-      },
-      name: "Extension",
-      chrome_settings_overrides: { homepage: "ext.html" },
-      // We'll only focus the URL bar on a moz-extension:// home page if we're
-      // using the same custom URL for the newtab page.
-      chrome_url_overrides: { newtab: "ext.html" },
-    },
-    files: { "ext.html": "<h1>1</h1>" },
-    useAddonManager: "temporary",
-  });
-
-  await extension.startup();
-
-  // This is a little weird. On the initial home navigation, we ask the user
-  // for confirmation that the new extension should override the home page. This
-  // confirmation dialog is focused. Forcing an extra home navigation emulates
-  // clicking "keep changes" on that dialog, and avoids adding more complexity
-  // here.
-
-  // Ensure that we only proceed after the confirmation dialog has shown up.
-  await doNavigateHome("", false, browser =>
-    TestUtils.waitForCondition(() =>
-      browser.ownerDocument.getElementById("extension-homepage-notification")
-    )
-  );
-  await doNavigateHome("", true);
-
-  await extension.unload();
-});