зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328829 Part 2: Check that related browser is not copied when switching remote type. r=gijs
This commit is contained in:
Родитель
76579c1821
Коммит
859f18b493
|
@ -2,6 +2,7 @@
|
|||
support-files =
|
||||
dummy_page.html
|
||||
|
||||
[browser_allow_process_switches_despite_related_browser.js]
|
||||
[browser_tabSpinnerProbe.js]
|
||||
skip-if = !e10s # Tab spinner is e10s only.
|
||||
[browser_tabSwitchPrintPreview.js]
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
||||
|
||||
const DUMMY_FILE = "dummy_page.html";
|
||||
|
||||
// Test for bug 1328829.
|
||||
add_task(function* () {
|
||||
let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser,
|
||||
"data:text/html,Hi");
|
||||
registerCleanupFunction(function* () {
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
});
|
||||
|
||||
let promiseTab =
|
||||
BrowserTestUtils.waitForNewTab(gBrowser, "view-source:data:text/html,Hi");
|
||||
BrowserViewSource(tab.linkedBrowser);
|
||||
let viewSourceTab = yield promiseTab;
|
||||
registerCleanupFunction(function* () {
|
||||
yield BrowserTestUtils.removeTab(viewSourceTab);
|
||||
});
|
||||
|
||||
|
||||
let dummyPage = getChromeDir(getResolvedURI(gTestPath));
|
||||
dummyPage.append(DUMMY_FILE);
|
||||
const uriString = Services.io.newFileURI(dummyPage).spec;
|
||||
|
||||
let viewSourceBrowser = viewSourceTab.linkedBrowser;
|
||||
viewSourceBrowser.loadURI(uriString);
|
||||
let href = yield BrowserTestUtils.browserLoaded(viewSourceBrowser);
|
||||
is(href, uriString,
|
||||
"Check file:// URI loads in a browser that was previously for view-source");
|
||||
});
|
Загрузка…
Ссылка в новой задаче