diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
commit | 8148615da179fdd60f19018e13b4e94b95609cc6 (patch) | |
tree | 771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/components/sessionstore/test/browser_705597.js | |
parent | 494802c1be7888025b95260d23db187467d2b9dd (diff) | |
download | UXP-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_705597.js')
-rw-r--r-- | browser/components/sessionstore/test/browser_705597.js | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/browser/components/sessionstore/test/browser_705597.js b/browser/components/sessionstore/test/browser_705597.js deleted file mode 100644 index efadcfe88..000000000 --- a/browser/components/sessionstore/test/browser_705597.js +++ /dev/null @@ -1,58 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -var tabState = { - entries: [{url: "about:robots", children: [{url: "about:mozilla"}]}] -}; - -function test() { - waitForExplicitFinish(); - requestLongerTimeout(2); - - Services.prefs.setIntPref("browser.sessionstore.interval", 4000); - registerCleanupFunction(function () { - Services.prefs.clearUserPref("browser.sessionstore.interval"); - }); - - let tab = gBrowser.addTab("about:blank"); - - let browser = tab.linkedBrowser; - - promiseTabState(tab, tabState).then(() => { - let sessionHistory = browser.sessionHistory; - let entry = sessionHistory.getEntryAtIndex(0, false); - entry.QueryInterface(Ci.nsISHContainer); - - whenChildCount(entry, 1, function () { - whenChildCount(entry, 2, function () { - promiseBrowserLoaded(browser).then(() => { - return TabStateFlusher.flush(browser); - }).then(() => { - let {entries} = JSON.parse(ss.getTabState(tab)); - is(entries.length, 1, "tab has one history entry"); - ok(!entries[0].children, "history entry has no subframes"); - - // Make sure that we reset the state. - let blankState = { windows: [{ tabs: [{ entries: [{ url: "about:blank" }] }]}]}; - waitForBrowserState(blankState, finish); - }); - - // reload the browser to deprecate the subframes - browser.reload(); - }); - - // create a dynamic subframe - let doc = browser.contentDocument; - let iframe = doc.createElement("iframe"); - doc.body.appendChild(iframe); - iframe.setAttribute("src", "about:mozilla"); - }); - }); -} - -function whenChildCount(aEntry, aChildCount, aCallback) { - if (aEntry.childCount == aChildCount) - aCallback(); - else - setTimeout(() => whenChildCount(aEntry, aChildCount, aCallback), 100); -} |