зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374741 - Within browser/ tests make openUILinkIn() provide the correct triggeringPrincipal. r=gijs
MozReview-Commit-ID: 9tJ0b056yNE --HG-- extra : rebase_source : 6b6c807dc592be347d3e53d700b3ae1fbdc37452
This commit is contained in:
Родитель
ff73ac0338
Коммит
d603d359f4
|
@ -11,13 +11,13 @@ function test() {
|
|||
gBrowser.pinTab(newTab);
|
||||
gBrowser.selectedTab = newTab;
|
||||
|
||||
openUILinkIn("javascript:var x=0;", "current");
|
||||
openTrustedLinkIn("javascript:var x=0;", "current");
|
||||
is(gBrowser.tabs.length, 2, "Should open in current tab");
|
||||
|
||||
openUILinkIn("http://example.com/1", "current");
|
||||
openTrustedLinkIn("http://example.com/1", "current");
|
||||
is(gBrowser.tabs.length, 2, "Should open in current tab");
|
||||
|
||||
openUILinkIn("http://example.org/", "current");
|
||||
openTrustedLinkIn("http://example.org/", "current");
|
||||
is(gBrowser.tabs.length, 3, "Should open in new tab");
|
||||
|
||||
gBrowser.removeTab(newTab);
|
||||
|
|
|
@ -11,7 +11,9 @@ function test() {
|
|||
gBrowser.pinTab(newTab);
|
||||
gBrowser.selectedTab = newTab;
|
||||
|
||||
openUILinkIn("http://example.org/", "current", { inBackground: true });
|
||||
openTrustedLinkIn("http://example.org/", "current", {
|
||||
inBackground: true,
|
||||
});
|
||||
isnot(gBrowser.selectedTab, newTab, "shouldn't load in background");
|
||||
|
||||
gBrowser.removeTab(newTab);
|
||||
|
|
|
@ -716,7 +716,7 @@ async function promiseTab() {
|
|||
deferred.resolve(msg("init"));
|
||||
});
|
||||
}, true, true);
|
||||
openUILinkIn(pageURL, "current");
|
||||
openTrustedLinkIn(pageURL, "current");
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,8 +38,10 @@ add_task(async function test_remoteWebNavigation_postdata() {
|
|||
"\r\n" +
|
||||
"success";
|
||||
|
||||
openUILinkIn(path, "tab", null, makeInputStream(postdata));
|
||||
|
||||
openTrustedLinkIn(path, "tab", {
|
||||
allowThirdPartyFixup: null,
|
||||
postData: makeInputStream(postdata),
|
||||
});
|
||||
});
|
||||
BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ const PROBE_TESTS = [
|
|||
prepare(browser) {},
|
||||
|
||||
async doAction(browser) {
|
||||
openUILinkIn(PAGE_2, "current");
|
||||
openTrustedLinkIn(PAGE_2, "current");
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче