Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider providing a mochitest to verify XPI is installed, active, etc. for regression testing #66

Open
biancadanforth opened this issue May 14, 2018 · 0 comments
Assignees

Comments

@biancadanforth
Copy link
Collaborator

biancadanforth commented May 14, 2018

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 = "[email protected]";
  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:

@biancadanforth biancadanforth self-assigned this May 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant