-
Notifications
You must be signed in to change notification settings - Fork 18
Description
This is coming out of some improvements @rhelmer, jmaher and I have been working on for easier in-tree regression testing. Basically, there will be a directory in a local build of Firefox where the add-on XPI can be dropped to be installed with the user's profile for Mochitest, Talos and XPCShell tests.
Gregg had the excellent idea that there should be a test to make sure that the add-on is successfully installed, is active, etc. After talking with rhelmer, it seems the best place for that test would be the template.
Assigning this to myself, as I have already done some work towards this (results for patch: with my XPI, without my XPI). Here's the test I created with rhelmer's help:
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
async function test() {
waitForExplicitFinish();
run_next_test();
}
add_test(async function() {
var ID = "tracking-protection-messaging-study-test@shield.mozilla.org";
let aAddon = await AddonManager.getAddonByID(ID);
ok(aAddon, "addon does not exist");
run_next_test();
});
function end_test() {
finish();
}This test would pass if the add-on is installed in the profile.
Note: The failed tests for the Try run with my XPI are due to the nature of the add-on itself (they are PB and first-party isolation related; all timed out trying to load URLs in a similar way).
Resources: