summaryrefslogtreecommitdiffstats
path: root/browser/components/sessionstore/test/browser_page_title.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/sessionstore/test/browser_page_title.js')
-rw-r--r--browser/components/sessionstore/test/browser_page_title.js45
1 files changed, 0 insertions, 45 deletions
diff --git a/browser/components/sessionstore/test/browser_page_title.js b/browser/components/sessionstore/test/browser_page_title.js
deleted file mode 100644
index 9bbb1ca76..000000000
--- a/browser/components/sessionstore/test/browser_page_title.js
+++ /dev/null
@@ -1,45 +0,0 @@
-"use strict";
-
-const URL = "data:text/html,<title>initial title</title>";
-
-add_task(function* () {
- // Create a new tab.
- let tab = gBrowser.addTab(URL);
- yield promiseBrowserLoaded(tab.linkedBrowser);
-
- // Remove the tab.
- yield promiseRemoveTab(tab);
-
- // Check the title.
- let [{state: {entries}}] = JSON.parse(ss.getClosedTabData(window));
- is(entries[0].title, "initial title", "correct title");
-});
-
-add_task(function* () {
- // Create a new tab.
- let tab = gBrowser.addTab(URL);
- let browser = tab.linkedBrowser;
- yield promiseBrowserLoaded(browser);
-
- // Flush to ensure we collected the initial title.
- yield TabStateFlusher.flush(browser);
-
- // Set a new title.
- yield ContentTask.spawn(browser, null, function* () {
- return new Promise(resolve => {
- addEventListener("DOMTitleChanged", function onTitleChanged() {
- removeEventListener("DOMTitleChanged", onTitleChanged);
- resolve();
- });
-
- content.document.title = "new title";
- });
- });
-
- // Remove the tab.
- yield promiseRemoveTab(tab);
-
- // Check the title.
- let [{state: {entries}}] = JSON.parse(ss.getClosedTabData(window));
- is(entries[0].title, "new title", "correct title");
-});