зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1375710 - Remove CPOWs from browser_bug592338.js. r=Gijs
MozReview-Commit-ID: Lo3JgFSP07j --HG-- extra : rebase_source : 2bc2b6d7d7d4d5c82ce2b47d90b8a13d7481c323
This commit is contained in:
Родитель
11e5ecd4d6
Коммит
2f526fd6bc
|
@ -40,24 +40,20 @@ function test_install_http() {
|
|||
var pm = Services.perms;
|
||||
pm.add(makeURI("http://example.org/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "http://example.org/browser/browser/base/content/test/general/bug592338.html");
|
||||
gBrowser.selectedBrowser.addEventListener("pageshow", function() {
|
||||
if (gBrowser.contentDocument.location.href == "about:blank")
|
||||
return;
|
||||
// NB: Not https so no installs allowed.
|
||||
const URL = "http://example.org/browser/browser/base/content/test/general/bug592338.html";
|
||||
BrowserTestUtils.openNewForegroundTab({ gBrowser, url: URL }).then(async function() {
|
||||
let prompted = promisePopupNotificationShown("addon-webext-permissions");
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
await prompted;
|
||||
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
|
||||
is(LightweightThemeManager.currentTheme, null, "Should not have installed the test theme");
|
||||
|
||||
executeSoon(function() {
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
||||
is(LightweightThemeManager.currentTheme, null, "Should not have installed the test theme");
|
||||
pm.remove(makeURI("http://example.org/"), "install");
|
||||
|
||||
gBrowser.removeTab(gBrowser.selectedTab);
|
||||
|
||||
pm.remove(makeURI("http://example.org/"), "install");
|
||||
|
||||
runNextTest();
|
||||
});
|
||||
runNextTest();
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -67,13 +63,8 @@ function test_install_lwtheme() {
|
|||
var pm = Services.perms;
|
||||
pm.add(makeURI("https://example.com/"), "install", pm.ALLOW_ACTION);
|
||||
|
||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser, "https://example.com/browser/browser/base/content/test/general/bug592338.html");
|
||||
gBrowser.selectedBrowser.addEventListener("pageshow", function() {
|
||||
if (gBrowser.contentDocument.location.href == "about:blank")
|
||||
return;
|
||||
|
||||
gBrowser.selectedBrowser.removeEventListener("pageshow", arguments.callee);
|
||||
|
||||
const URL = "https://example.com/browser/browser/base/content/test/general/bug592338.html";
|
||||
BrowserTestUtils.openNewForegroundTab({ gBrowser, url: URL }).then(() => {
|
||||
let promise = promisePopupNotificationShown("addon-installed");
|
||||
BrowserTestUtils.synthesizeMouse("#theme-install", 2, 2, {}, gBrowser.selectedBrowser);
|
||||
promise.then(() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче