blob: 61505b5b1f3016a77e08620f203894a9e38cfd6a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
/* 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.loadURIString(
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);
});
|