mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
6497dc1292
MozReview-Commit-ID: KMgNw5QsMIX --HG-- extra : rebase_source : b3f3e2dbd568e88c0e8461fb4bfadbbdd9baaa99
25 lines
1.0 KiB
JavaScript
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.");
|
|
});
|
|
});
|