diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js')
-rw-r--r-- | browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js b/browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js new file mode 100644 index 0000000000..f54d0edaaa --- /dev/null +++ b/browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js @@ -0,0 +1,33 @@ +add_task(async function testSetHomepageUseCurrent() { + is( + gBrowser.currentURI.spec, + "about:blank", + "Test starts with about:blank open" + ); + await BrowserTestUtils.openNewForegroundTab(gBrowser, "about:home"); + await openPreferencesViaOpenPreferencesAPI("paneHome", { leaveOpen: true }); + let doc = gBrowser.contentDocument; + is( + gBrowser.currentURI.spec, + "about:preferences#home", + "#home should be in the URI for about:preferences" + ); + let oldHomepage = HomePage.get(); + + let useCurrent = doc.getElementById("useCurrentBtn"); + useCurrent.click(); + + is(gBrowser.tabs.length, 3, "Three tabs should be open"); + await TestUtils.waitForCondition( + () => HomePage.get() == "about:blank|about:home" + ); + is( + HomePage.get(), + "about:blank|about:home", + "about:blank and about:home should be the only homepages set" + ); + + HomePage.safeSet(oldHomepage); + BrowserTestUtils.removeTab(gBrowser.selectedTab); + BrowserTestUtils.removeTab(gBrowser.selectedTab); +}); |