Closed Bug 1373772 Opened 7 years ago Closed 7 years ago

Switch marionette unit test over to a webextension

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: aswan, Assigned: aswan)

References

Details

Attachments

(1 file)

The unit test in testing/marionette/harness/marionette_harness/tests/unit/test_addons.py installs an extension, but it uses a legacy extension which will stop working in Firefox 57.  Lets switch it to a webextension.
Attachment #8878618 - Flags: review?(hskupin)
Comment on attachment 8878618 [details]
Bug 1373772 Use webextensions in marionette unit tests

https://reviewboard.mozilla.org/r/149932/#review155190

I downloaded the patch to check the content of the webextension, but the patch file doesn't contain anything? Also please replace the addon under `marionette_harness/www/`.
Attachment #8878618 - Flags: review?(hskupin) → review-
(In reply to Henrik Skupin (:whimboo) from comment #2)
> I downloaded the patch to check the content of the webextension, but the
> patch file doesn't contain anything?

How did you download the patch?  If nothing else, you should be able to see the diffs in reviewboard?

> Also please replace the addon under
> `marionette_harness/www/`.

This bug is just meant to do what's neceessary to get our automation running in builds where legacy extensions are disabled and no test that uses that code is currently breaking.  It looks like maybe test_clicks.py isn't testing what it is meant to test, but if you want to open a separate bug for that, I'd be happy to help you with it.
Flags: needinfo?(hskupin)
(In reply to Andrew Swan [:aswan] from comment #3)
> How did you download the patch?  If nothing else, you should be able to see
> the diffs in reviewboard?

I downloaded it via MozReview's "Download Diff" feature given that MozReview cannot display binary content.

> This bug is just meant to do what's neceessary to get our automation running
> in builds where legacy extensions are disabled and no test that uses that
> code is currently breaking.  It looks like maybe test_clicks.py isn't
> testing what it is meant to test, but if you want to open a separate bug for
> that, I'd be happy to help you with it.

This specific test doesn't install the extension, but waits for the notification popup to appear. So it should only be necessary to replace the extension. Nothing should break. With that we won't have any other legacy extension laying around for Marionette anymore.
Flags: needinfo?(hskupin)
Updated to also replace the xpi from comment 2.

As for looking at the new xpi files, the two are identical, they contain just a manifest.json with the contents:

{
  "manifest_version": 2,
  "name": "install test",
  "description": "install test",
  "version": "1.0"
}

If you want to verify that yourself you could pull or import the new revision into your local repo and then just look at the xpi file locally?  I'm not sure what else to do since these tests are written to require binary files checked into the tree...
Comment on attachment 8878618 [details]
Bug 1373772 Use webextensions in marionette unit tests

https://reviewboard.mozilla.org/r/149932/#review156872

I was a bit anxious first when I saw the removal of the legacy extensions in this patch, but after talking to Andrew on IRC I realized that the part we test here in Marionette is just that we can install an XPI file. More detailed tests for both legacy or web extensions should be done for the add-on manager mochitests. Only having web extensions now, should be fine because other harnesses which use Marionette to install extensions might still install legacy ones, so if we regress something we will see it anyway.
Attachment #8878618 - Flags: review?(hskupin) → review+
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0cb48d9fe531
Use webextensions in marionette unit tests r=whimboo
https://hg.mozilla.org/mozilla-central/rev/0cb48d9fe531
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: