mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 00:07:30 +09:00
25 lines
1,013 B
JavaScript
25 lines
1,013 B
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(function test() {
|
|
requestLongerTimeout(2);
|
|
const page1 = 'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
|
|
'browser_privatebrowsing_localStorage_page1.html'
|
|
|
|
let win = yield BrowserTestUtils.openNewBrowserWindow({private: true});
|
|
|
|
let tab = win.gBrowser.selectedTab = win.gBrowser.addTab(page1);
|
|
let browser = win.gBrowser.selectedBrowser;
|
|
yield BrowserTestUtils.browserLoaded(browser);
|
|
|
|
browser.loadURI(
|
|
'http://mochi.test:8888/browser/browser/components/privatebrowsing/test/browser/' +
|
|
'browser_privatebrowsing_localStorage_page2.html');
|
|
yield BrowserTestUtils.browserLoaded(browser);
|
|
|
|
is(browser.contentTitle, '2', "localStorage should contain 2 items");
|
|
|
|
// Cleanup
|
|
yield BrowserTestUtils.closeWindow(win);
|
|
});
|