Closed Bug 1748546 Opened 2 years ago Closed 2 years ago

action namespace persistent listeners

Categories

(WebExtensions :: General, enhancement, P1)

enhancement
Points:
1

Tracking

(firefox100 fixed)

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mixedpuppy, Assigned: rpl)

References

(Blocks 1 open bug)

Details

(Whiteboard: [addons-jira])

Attachments

(4 files)

Modifications to support non-persistent background scripts (event pages and/or service workers)

Assignee: nobody → lgreco
Status: NEW → ASSIGNED

browser_ext_browserAction_popup_resize.js was permafailing for me locally, even without the other changes part
of this issue, that was more annoying than usually because I wanted to be sure that the changes for the browserAction
persistent listeners were not breaking any of the existing tests but it was tricky without being able to see the
test to pass consistently also when running locally.

The reason behind the failure was a 1px difference in width for the browserAction popup.
Given that the tests in browser_ext_browserAction_popup_resize.js were already being tollerant
elsewhere about a 1px difference between the dimensions of the content compared to the dimensions
the test case was expecting, it seems reasonable to apply a similar tollerance in the
test helper used to wait for the content dimentions to reach a given set of expected dimentions
and make this test able to pass consistently when running locally.

Attachment #9265619 - Attachment description: WIP: Bug 1748546 - Add support for persistent events to ext-browserAction.js. → Bug 1748546 - Add support for persistent events to ext-browserAction.js. r?mixedpuppy!

The GeckoView ext-browserAction.js and ext-pageAction.js seems to not be fully providing
the browserActionFor/pageActionFor internal global helpers that their Desktop counterparts
are defining.

Technically this shouldn't be triggering any issue at the moment, because at the moment
it seems only used for the commands API (and also internally by the menu API apparently),
which are both not currently provided in GeckoView builds.

Anyway, it seems that they were still intented to be provided, because browserAction
does have it but incomplete version (whereas pageAction none at all).

It may be reasonable to move this in its own separate bugzilla issue, but in the meantime
I wanted to be sure to don't forget about it and so I'm attaching as a separate patch
in this set of changes for the two browserAction/pageAction APIs.

Depends on D141664

Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/48b01553f3cc
Fix pre-existing perma-failures when running browserAction popup resize tests locally on Linux. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/08a3eaa8bce7
Add support for persistent events to ext-browserAction.js. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/51e7602cd3ae
Add support for persistent events to ext-pageAction.js. r=mixedpuppy
https://hg.mozilla.org/integration/autoland/rev/ed616e2e0abb
Add missing browserActionFor definition in GeckoView ext-browserAction.js module. r=robwu,geckoview-reviewers,agi
Blocks: 1761748
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: