mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1199842 - [webext] Add missing XUL_NS variable for browser_action (r=gabor)
This commit is contained in:
parent
fdb75efced
commit
1acf39a61c
@ -140,6 +140,7 @@ BrowserAction.prototype = {
|
||||
panel.setAttribute("flip", "slide");
|
||||
node.appendChild(panel);
|
||||
|
||||
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
|
||||
let browser = document.createElementNS(XUL_NS, "browser");
|
||||
browser.setAttribute("type", "content");
|
||||
browser.setAttribute("disableglobalhistory", "true");
|
||||
|
@ -1,4 +1,5 @@
|
||||
[browser_extensions_simple.js]
|
||||
[browser_ext_browserAction_simple.js]
|
||||
[browser_ext_tabs_executeScript.js]
|
||||
[browser_ext_tabs_query.js]
|
||||
[browser_ext_tabs_update.js]
|
||||
|
@ -0,0 +1,36 @@
|
||||
add_task(function* () {
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
"browser_action": {
|
||||
"default_popup": "popup.html"
|
||||
}
|
||||
},
|
||||
|
||||
files: {
|
||||
"popup.html": `
|
||||
<!DOCTYPE html>
|
||||
<html><body>
|
||||
<script src="popup.js"></script>
|
||||
</body></html>
|
||||
`,
|
||||
|
||||
"popup.js": function() {
|
||||
browser.runtime.sendMessage("from-popup");
|
||||
}
|
||||
},
|
||||
|
||||
background: function() {
|
||||
browser.runtime.onMessage.addListener(msg => {
|
||||
browser.test.assertEq(msg, "from-popup", "correct message received");
|
||||
browser.test.notifyPass("browser_action.simple");
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
yield extension.startup();
|
||||
|
||||
// FIXME: Should really test opening the popup here.
|
||||
|
||||
yield extension.awaitFinish("browser_action.simple");
|
||||
yield extension.unload();
|
||||
});
|
Loading…
Reference in New Issue
Block a user