summaryrefslogtreecommitdiffstats
path: root/browser/base/content/test/tabs/browser_navigate_home_focuses_addressbar.js
blob: a34608df47e4a3d4985668f4be153ffad733a086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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");

// 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());
    is(gURLBar.value, "", "URL bar should be empty");
    ok(gURLBar.focused, "URL bar should be focused");
  });
});