fune/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_localStorage.js
Victor Porof 1f830c96da Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042

--HG--
extra : source : d3afcafdce650a6f36cebbc126ee93b17f13cf52
2019-07-05 09:53:32 +02:00

28 lines
1 KiB
JavaScript

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
add_task(async function test() {
requestLongerTimeout(2);
const page1 =
"http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/" +
"browser_privatebrowsing_localStorage_page1.html";
let win = await BrowserTestUtils.openNewBrowserWindow({ private: true });
win.gBrowser.selectedTab = BrowserTestUtils.addTab(win.gBrowser, page1);
let browser = win.gBrowser.selectedBrowser;
await BrowserTestUtils.browserLoaded(browser);
BrowserTestUtils.loadURI(
browser,
"http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/" +
"browser_privatebrowsing_localStorage_page2.html"
);
await BrowserTestUtils.browserLoaded(browser);
is(browser.contentTitle, "2", "localStorage should contain 2 items");
// Cleanup
await BrowserTestUtils.closeWindow(win);
});