зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset c196f0d65eab (bug 1432083) for browser chrome failures on browser_extension_sideloading.js.
CLOSED TREE
This commit is contained in:
Родитель
e66ace8456
Коммит
b1e51ad561
|
@ -175,7 +175,6 @@ skip-if = (verify && debug && (os == 'mac'))
|
|||
[browser_ext_popup_corners.js]
|
||||
[browser_ext_popup_focus.js]
|
||||
disabled = bug 1438663
|
||||
[browser_ext_popup_requestPermission.js]
|
||||
[browser_ext_popup_select.js]
|
||||
skip-if = debug || os != 'win' # FIXME: re-enable on debug build (bug 1442822)
|
||||
[browser_ext_popup_sendMessage.js]
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
add_task(async function test_popup_requestPermission_resolve() {
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
browser_action: {
|
||||
default_popup: "popup.html",
|
||||
},
|
||||
optional_permissions: ["<all_urls>"],
|
||||
},
|
||||
|
||||
files: {
|
||||
"popup.html": `<meta charset="utf-8"><script src="popup.js"></script>`,
|
||||
"popup.js": async () => {
|
||||
const success = await new Promise(resolve => {
|
||||
browser.test.withHandlingUserInput(() => {
|
||||
resolve(
|
||||
browser.permissions.request({
|
||||
origins: ["<all_urls>"],
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
browser.test.assertTrue(
|
||||
success,
|
||||
"browser.permissions.request promise resolves"
|
||||
);
|
||||
browser.test.sendMessage("done");
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const requestPrompt = promisePopupNotificationShown(
|
||||
"addon-webext-permissions"
|
||||
).then(panel => {
|
||||
panel.button.click();
|
||||
});
|
||||
await extension.startup();
|
||||
await clickBrowserAction(extension);
|
||||
await requestPrompt;
|
||||
await extension.awaitMessage("done");
|
||||
await extension.unload();
|
||||
});
|
|
@ -41,9 +41,6 @@ function getTabBrowser(browser) {
|
|||
while (browser.ownerGlobal.docShell.itemType !== Ci.nsIDocShell.typeChrome) {
|
||||
browser = browser.ownerGlobal.docShell.chromeEventHandler;
|
||||
}
|
||||
if (browser.getAttribute("webextension-view-type") == "popup") {
|
||||
browser = browser.ownerGlobal.gBrowser.selectedBrowser;
|
||||
}
|
||||
return { browser, window: browser.ownerGlobal };
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче