mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
Move WebExtensions enabled Add-ons Manager
This commit is contained in:
parent
d7d16e7fbb
commit
358cd0404a
1100 changed files with 133 additions and 106 deletions
|
|
@ -0,0 +1,35 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// Tests installing an local file works when loading the url
|
||||
function test() {
|
||||
Harness.installEndedCallback = install_ended;
|
||||
Harness.installsCompletedCallback = finish_test;
|
||||
Harness.setup();
|
||||
|
||||
var cr = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
||||
.getService(Components.interfaces.nsIChromeRegistry);
|
||||
|
||||
var chromeroot = extractChromeRoot(gTestPath);
|
||||
var xpipath = chromeroot + "unsigned.xpi";
|
||||
try {
|
||||
xpipath = cr.convertChromeURL(makeURI(chromeroot + "amosigned.xpi")).spec;
|
||||
} catch (ex) {
|
||||
// scenario where we are running from a .jar and already extracted
|
||||
}
|
||||
|
||||
gBrowser.selectedTab = gBrowser.addTab("about:blank");
|
||||
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
|
||||
gBrowser.loadURI(xpipath);
|
||||
});
|
||||
}
|
||||
|
||||
function install_ended(install, addon) {
|
||||
install.cancel();
|
||||
}
|
||||
|
||||
function finish_test(count) {
|
||||
is(count, 1, "1 Add-on should have been successfully installed");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
Harness.finish();
|
||||
}
|
||||
// ----------------------------------------------------------------------------
|
||||
Loading…
Add table
Add a link
Reference in a new issue