summaryrefslogtreecommitdiffstats
path: root/docshell/test/browser/browser_bug1674464.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:32:43 +0000
commit6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /docshell/test/browser/browser_bug1674464.js
parentInitial commit. (diff)
downloadthunderbird-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 '')
-rw-r--r--docshell/test/browser/browser_bug1674464.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/docshell/test/browser/browser_bug1674464.js b/docshell/test/browser/browser_bug1674464.js
new file mode 100644
index 0000000000..4078cfe6c7
--- /dev/null
+++ b/docshell/test/browser/browser_bug1674464.js
@@ -0,0 +1,38 @@
+const DUMMY_1 =
+ // eslint-disable-next-line @microsoft/sdl/no-insecure-url
+ "http://example.org/browser/docshell/test/browser/dummy_page.html";
+const DUMMY_2 =
+ // eslint-disable-next-line @microsoft/sdl/no-insecure-url
+ "http://example.com/browser/docshell/test/browser/dummy_page.html";
+
+add_task(async function test_backAndReload() {
+ await BrowserTestUtils.withNewTab(
+ { gBrowser, url: DUMMY_1 },
+ async function (browser) {
+ await BrowserTestUtils.crashFrame(browser);
+
+ info("Start second load.");
+ BrowserTestUtils.loadURIString(browser, DUMMY_2);
+ await BrowserTestUtils.waitForLocationChange(gBrowser, DUMMY_2);
+
+ browser.goBack();
+ await BrowserTestUtils.waitForLocationChange(gBrowser);
+
+ is(
+ browser.browsingContext.childSessionHistory.index,
+ 0,
+ "We should have gone back to the first page"
+ );
+ is(
+ browser.browsingContext.childSessionHistory.count,
+ 2,
+ "If a tab crashes after a load has finished we shouldn't have an entry for about:tabcrashed"
+ );
+ is(
+ browser.documentURI.spec,
+ DUMMY_1,
+ "If a tab crashes after a load has finished we shouldn't have an entry for about:tabcrashed"
+ );
+ }
+ );
+});