fune/browser/components/uitour/test/browser_UITour_showNewTab.js
Victor Porof 1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00

26 lines
597 B
JavaScript

"use strict";
var gTestTab;
var gContentAPI;
var gContentWindow;
add_task(setup_UITourTest);
// Test that we can switch to about:newtab
add_UITour_task(async function test_aboutNewTab() {
let newTabLoaded = BrowserTestUtils.browserLoaded(
gBrowser.selectedBrowser,
false,
"about:newtab"
);
info("Showing about:newtab");
await gContentAPI.showNewTab();
info("Waiting for about:newtab to load");
await newTabLoaded;
is(
gBrowser.selectedBrowser.currentURI.spec,
"about:newtab",
"Loaded about:newtab"
);
ok(gURLBar.focused, "Address bar gets focus");
});