summaryrefslogtreecommitdiffstats
path: root/browser/components/sessionstore/test/browser_491168.js
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
committerMatt A. Tobin <email@mattatobin.com>2018-02-03 06:00:38 -0500
commit8148615da179fdd60f19018e13b4e94b95609cc6 (patch)
tree771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/components/sessionstore/test/browser_491168.js
parent494802c1be7888025b95260d23db187467d2b9dd (diff)
downloadUXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz
UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/components/sessionstore/test/browser_491168.js')
-rw-r--r--browser/components/sessionstore/test/browser_491168.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/browser/components/sessionstore/test/browser_491168.js b/browser/components/sessionstore/test/browser_491168.js
deleted file mode 100644
index ae66afe77..000000000
--- a/browser/components/sessionstore/test/browser_491168.js
+++ /dev/null
@@ -1,42 +0,0 @@
-"use strict";
-
-const REFERRER1 = "http://example.org/?" + Date.now();
-const REFERRER2 = "http://example.org/?" + Math.random();
-
-add_task(function* () {
- function* checkDocumentReferrer(referrer, msg) {
- yield ContentTask.spawn(gBrowser.selectedBrowser, { referrer, msg }, function* (args) {
- Assert.equal(content.document.referrer, args.referrer, args.msg);
- });
- }
-
- // Add a new tab.
- let tab = gBrowser.selectedTab = gBrowser.addTab("about:blank");
- let browser = tab.linkedBrowser;
- yield promiseBrowserLoaded(browser);
-
- // Load a new URI with a specific referrer.
- let referrerURI = Services.io.newURI(REFERRER1, null, null);
- browser.loadURI("http://example.org", referrerURI, null);
- yield promiseBrowserLoaded(browser);
-
- yield TabStateFlusher.flush(browser);
- let tabState = JSON.parse(ss.getTabState(tab));
- is(tabState.entries[0].referrer, REFERRER1,
- "Referrer retrieved via getTabState matches referrer set via loadURI.");
-
- tabState.entries[0].referrer = REFERRER2;
- yield promiseTabState(tab, tabState);
-
- yield checkDocumentReferrer(REFERRER2,
- "document.referrer matches referrer set via setTabState.");
- gBrowser.removeCurrentTab();
-
- // Restore the closed tab.
- tab = ss.undoCloseTab(window, 0);
- yield promiseTabRestored(tab);
-
- yield checkDocumentReferrer(REFERRER2,
- "document.referrer is still correct after closing and reopening the tab.");
- gBrowser.removeCurrentTab();
-});