Closed Bug 1724026 Opened 1 year ago Closed 9 months ago

support test configuration for mv3 worker

Categories

(WebExtensions :: General, task, P1)

task
Points:
3

Tracking

(firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox98 --- fixed

People

(Reporter: mixedpuppy, Assigned: rpl)

References

(Blocks 1 open bug)

Details

(Whiteboard: [mv3-m2])

Attachments

(3 files, 1 obsolete file)

Rather than write new tests specific to using the service worker background, we want to have a configuration ini file that will cause loadExtension to switch background pages to the service worker. We can cherry pick the tests that we will add into that ini file.

Provide a way to use service workers as the background script in existing tests.

See Also: → 1724183
Points: --- → 3
Assignee: mixedpuppy → lgreco
Status: NEW → ASSIGNED
Attachment #9234758 - Attachment is obsolete: true
Attachment #9236072 - Attachment description: Bug 1724026 implement extension service worker test support → Bug 1724026 implement extension service worker test support. r?mixedpuppy!
Attachment #9256160 - Attachment description: WIP: Bug 1724026 - Ensure that test files included in multiple manifest are executed once per manifest. → Bug 1724026 - Ensure that test files included in multiple manifest are executed once per manifest.
Attachment #9236072 - Attachment description: Bug 1724026 implement extension service worker test support. r?mixedpuppy! → Bug 1724026 - Support running existing Extension API mochitests with a background service worker. r?mixedpuppy!

This patch includes:

  • a new xpcshell-serviceworker.ini manifest, all tests included in this manifest will also run in the
    "background service worker mode", initially including all alarms API xpcshell tests

  • some small changes to test_ext_alarms.js to temporarily skip test case that can't yet pass
    while running in "background service worker mode" (until fixed in separate followups)

  • some small tweaks to head_service_worker.js to avoid failure due to an existing ExtensionCommon
    const bindings being redefined while running a test for the xpcshell-remote.ini manifest

Depends on D122536

Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/dfac5955ed61
Ensure that test files included in multiple manifest are executed once per manifest. r=gbrown
https://hg.mozilla.org/integration/autoland/rev/a14c7fb88490
Support running existing Extension API mochitests with a background service worker. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/461db77b2f1f
Add a new xpcshell-serviceworker.ini manifest and include all alarms API tests in it. r=mixedpuppy

(In reply to Norisz Fay [:noriszfay] from comment #6)

Backed out for causing python failures

Backout link: https://hg.mozilla.org/integration/autoland/rev/f1bf4a027490d20440a1cea3f86e397bdcfa1327

Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=S51u_yLqQ7eMo5l2-6jKbg.0&resultStatus=testfailed%2Cbusted%2Cexception%2Cretry%2Cusercancel&revision=461db77b2f1f5e95ba7b52b98cb563b084bc9b26

Failure log(s): https://treeherder.mozilla.org/logviewer?job_id=363758551&repo=autoland

I see what is triggering that python test failure, and I was also able to reproduce it locally (unfortunately that python test was not part of the same set of tests I added a new test case to, and so it did not run in my push to try).

I've updated https://phabricator.services.mozilla.com/D134293 with a small trivial change that fix the failure, and I'll push it to autoland again in a few minutes.

Flags: needinfo?(lgreco)
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/a78cf95d81c9
Ensure that test files included in multiple manifest are executed once per manifest. r=gbrown
https://hg.mozilla.org/integration/autoland/rev/439ad9645e72
Support running existing Extension API mochitests with a background service worker. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/0c06f0e7e4a2
Add a new xpcshell-serviceworker.ini manifest and include all alarms API tests in it. r=mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
Duplicate of this bug: 1723785
You need to log in before you can comment on or make changes to this bug.