gecko-dev/browser/base/content/test/general/browser_bug724239.js
Ed Lee 6497dc1292 Bug 1433324 - Part 3. Assume true for browser.newtabpage.activity-stream.enabled. r=ursula
MozReview-Commit-ID: KMgNw5QsMIX

--HG--
extra : rebase_source : b3f3e2dbd568e88c0e8461fb4bfadbbdd9baaa99
2018-02-13 16:53:50 -08:00

25 lines
1.0 KiB
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(async function test_blank() {
await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
async function(browser) {
BrowserTestUtils.loadURI(browser, "http://example.com");
await BrowserTestUtils.browserLoaded(browser);
ok(!gBrowser.canGoBack, "about:blank wasn't added to session history");
});
});
add_task(async function test_newtab() {
await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" },
async function(browser) {
// Can't load it directly because that'll use a preloaded tab if present.
BrowserTestUtils.loadURI(browser, "about:newtab");
await BrowserTestUtils.browserLoaded(browser);
BrowserTestUtils.loadURI(browser, "http://example.com");
await BrowserTestUtils.browserLoaded(browser);
is(gBrowser.canGoBack, true, "about:newtab was added to the session history when AS was enabled.");
});
});