Commit Graph

2668 Commits

Author SHA1 Message Date
Rob Wu
aaac457a1d Bug 1723156 - Warn instead of fail for manifest version mismatches r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D143720
2022-04-17 16:43:49 +00:00
Shane Caraveo
8a81b8a988 Bug 1762394 menu startupCache persistence r=robwu
Add a StartupCache for menus so they are recreated when extensions use event pages.

Differential Revision: https://phabricator.services.mozilla.com/D139789
2022-04-07 22:26:19 +00:00
Shane Caraveo
d47baeee32 Bug 1748558 enforce requirement of id in menus apis for event pages r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D138489
2022-04-04 22:16:55 +00:00
Shane Caraveo
9e2c9b1e0e Bug 1748558 persistence for menus events r=robwu,rpl
Differential Revision: https://phabricator.services.mozilla.com/D138488
2022-04-04 22:16:54 +00:00
Andreea Pavel
e622e3f051 Bug 1722607 - disable browser_ext_tabs_discard_reversed.js on linux64 r=intermittent-reviewers,MasterWayZ,robwu
Differential Revision: https://phabricator.services.mozilla.com/D142287
2022-04-02 20:19:56 +00:00
Shane Caraveo
594876b513 Bug 1748567 support persistent events in tabs api r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D140915
2022-03-31 23:29:25 +00:00
Tooru Fujisawa
845f7c0588 Bug 1762326 - Do not get information about a tab with empty history in browser.sessions.getRecentlyClosed. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D142526
2022-03-31 16:36:10 +00:00
Norisz Fay
eab63d7fa6 Backed out 3 changesets (bug 1748558, bug 1761814) for causing bc failures on browser_ext_contextMenus_commands.js CLOSED TREE
Backed out changeset af7fa12fd8f2 (bug 1761814)
Backed out changeset 4dbc1e13c9ce (bug 1748558)
Backed out changeset d254a677ce9e (bug 1748558)
2022-03-31 18:10:01 +03:00
Shane Caraveo
e9cf249fc1 Bug 1748558 enforce requirement of id in menus apis for event pages r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D138489
2022-03-31 13:50:36 +00:00
Shane Caraveo
142e6783ad Bug 1748558 persistence for menus events r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D138488
2022-03-31 13:50:35 +00:00
Emilio Cobos Álvarez
069226d949 Bug 1762081 - Add a hidden pref to default to a unified chrome/content color-scheme. r=Gijs
Thunderbird wants this. I could put the check in C++ instead, but this
is simple enough IMO.

Differential Revision: https://phabricator.services.mozilla.com/D142405
2022-03-30 17:24:01 +00:00
Gijs Kruitbosch
edda40141b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Rob Wu
86b2fcd91f Bug 1556427 - Add node.title to bookmarks.onRemoved event r=Standard8,willdurand,markh
The `bookmarks.onRemoved` event should have a `title` attribute
reflecting the title of the removed bookmark. This behavior is
documented in an example at:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks/onRemoved

That documented example was reportedly broken: https://github.com/mdn/content/issues/13052

Differential Revision: https://phabricator.services.mozilla.com/D139293
2022-03-30 12:57:28 +00:00
Norisz Fay
e1d7571cc8 Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
1214ac636b Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Shane Caraveo
b32601a1c1 Bug 1748565 support persistent listener in sessions api r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D140889
2022-03-28 15:37:03 +00:00
Luca Greco
77d54fcaf7 Bug 1748546 - Add support for persistent events to ext-pageAction.js. r=mixedpuppy
Depends on D139786

Differential Revision: https://phabricator.services.mozilla.com/D141664
2022-03-25 20:38:36 +00:00
Luca Greco
6f2b70ed2b Bug 1748546 - Add support for persistent events to ext-browserAction.js. r=mixedpuppy
Depends on D141663

Differential Revision: https://phabricator.services.mozilla.com/D139786
2022-03-25 20:38:36 +00:00
Luca Greco
282de625fe Bug 1748546 - Fix pre-existing perma-failures when running browserAction popup resize tests locally on Linux. r=mixedpuppy
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.

Differential Revision: https://phabricator.services.mozilla.com/D141663
2022-03-25 20:38:36 +00:00
kernp25
f3b6f248eb Bug 1372100 - Support muted in tabs.create. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D140677
2022-03-23 21:20:31 +00:00
Shane Caraveo
63f69f4bac Bug 1748555 support persistent listeners in history api r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D140896
2022-03-23 15:03:32 +00:00
Shane Caraveo
8820da156b Bug 1748549 support persistent listeners in bookmarks api r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D140900
2022-03-22 14:26:57 +00:00
Shane Caraveo
51ddb80eff Bug 1748551 support persistent event for commands.onCommand api r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D141516
2022-03-19 01:42:51 +00:00
Shane Caraveo
2530614cac Bug 1757760 retain correct search default setting after addon update r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D141294
2022-03-18 19:43:43 +00:00
Shane Caraveo
016d94650b Bug 1748571 support peristent listeners on windows api r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D140892
2022-03-17 22:22:18 +00:00
smolnar
1e7b706a94 Backed out changeset 268f1e1be96c (bug 1748571) for causing bc failures in browser_ext_windows_events. CLOSED TREE 2022-03-17 20:08:24 +02:00
Shane Caraveo
0ee005e4c3 Bug 1748571 support peristent listeners on windows api r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D140892
2022-03-17 16:09:23 +00:00
Emilio Cobos Álvarez
e67e59df5c Bug 1736218 - Stop using heuristics to determine content color-scheme. r=dao
Use system color-scheme for content for anything that isn't explicitly
opted into.

Differential Revision: https://phabricator.services.mozilla.com/D140376
2022-03-17 14:44:04 +00:00
Emilio Cobos Álvarez
8f0d9534e0 Bug 1750932 - Add color_scheme / content_color_scheme properties to theme API. r=robwu,dao
This allows themes to override our light / dark theme heuristics if they
choose to, so that we don't have to complicate the heuristics too much.

This is specially useful for themes with images, where the image might
be "light", but still have enough contrast with light text. A good
example is the theme mentioned in bug 1749837 comment 0.

The semantics are:

 * color_scheme: If set, overrides the general "toolbar theme" (so
   window and context menu appearance and so on), otherwise we fall back
   to heuristics.

 * content_color_scheme: If set, overrides the color scheme for the
   content area. Otherwise we fall back to color_scheme if present, or
   heuristics otherwise.

One thing that I didn't include was a sort of "system" option, which
might be useful to say "this theme is neutral, and works both for light
and dark themes". Let me know if you think that's a must-have, otherwise
I think it's probably worth deferring to a follow-up if it's needed at
all.

Differential Revision: https://phabricator.services.mozilla.com/D136354
2022-03-17 14:44:03 +00:00
Shane Caraveo
1ca61e7334 Bug 1748562 support persistent listeners in omnibox api r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D140893
2022-03-16 15:02:32 +00:00
Luca Greco
7cff6e4c3c Bug 1759162 - Fix pkcs11.isModuleInstalled regressions triggered on non-windows builds. r=barret,willdurand
PathUtils.filename throws if the path is not an absolute path, which was likely
not the case with the OS.Path.basename call used previously.

This internal change of behavior shouldn't be triggering any issue on Windows,
where the hostInfo.manifest.path seems to be always normalized into an absolute
path (by computing it as relative to the hostInfo.manifest if it wasn't already
an absolute path), but it makes browser.pkcs11.isModuleInstalled to regress
on Linux (and maybe also on MacOS if the pkcs11 manifest files include only
the library name and not its full path, as it seems to be the case for
the Belgium eID pkcs11 manifest packaged for Linux).

The result of PathUtils.filename is expected to only include the basename of
the file (without the full dir path and the file extension) and so to fix
the regression being triggered on non-windows platform we could use a fake
absolute url to get the expected result using PathUtils.filename as is.

Differential Revision: https://phabricator.services.mozilla.com/D141097
2022-03-15 20:13:16 +00:00
Shane Caraveo
1c30b7cc0a Bug 1759073 move eventpage test functions into ExtensionTestCommon r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D140783
2022-03-15 17:48:36 +00:00
Olli Pettay
738eda667b Bug 1503404, try to make head_pageAction.js a tad more stable, r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D140974
2022-03-14 16:35:58 +00:00
Rob Wu
62d7f3b4a3 Bug 1756663 - Add test for id option of history.onTitleChanged r=willdurand
In bug 1678611, the id property was added to this event, without unit
tests. The existing test didn't pick up the change because it checked
for a specific property. This patch adds a check of the whole event
object to get coverage for the id property AND to avoid this kind of
issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D139408
2022-02-24 18:15:09 +00:00
Shane Caraveo
4d330e8910 Bug 1682681 fix intermittent context menu failure on non-visible elements r=robwu
If elements added to the doc were not visible, context-click on
the element would fail because composedTarget.ownerDocument is null.

Differential Revision: https://phabricator.services.mozilla.com/D138190
2022-02-19 23:27:02 +00:00
Shane Caraveo
e38cc78870 Bug 1753308 fix extension startup in tests, remove delayed startup pref r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D137699
2022-02-19 15:52:26 +00:00
Drew Willcoxon
db5729e7fe Bug 1754588 - Part 1: Generalize buttons in UrlbarView and add a block button to best match rows. r=dao
This adds a block button to best match rows. The button looks similar to the `?`
help button. For best match rows, both the block and help buttons appear, with
the block button first.

Figma spec, see "Top pick proposal
for Firefox 99 - awesomebar":
https://www.figma.com/file/seJ2ZA4v3FgoV7jCxUR74B/Firefox-Suggest?node-id=4937%3A67136

This does not handle clicks on the button because that will be covered by bug
1754591 and bug 1754594.

To test this, the easiest way is still probably to pause browser_bestMatch.js.
You can use the `nonsponsored()` task to test the block button by itself and
`nonsponsoredHelpButton()` to test with a help button; pause before the
`promisePopupClose()` at the end. If that's not practical I can post my WIP for
triggering best matches and you'll need to enable Firefox Suggest too.

To implement this I generalized the existing help button code into a way to add
arbitrary buttons. Instead I could have duplicated it, but that's not as nice
and it makes the CSS a little uglier because we'd need rules for handling the
help button alone, the block button alone, and both (although there are no plans
to show the block button alone). In addition, eventually we want a way to report
inappropriate suggestions so there's been discussion about having a report
button too. It may turn out that we add a single `...` button for everything,
but it's not clear yet.

I tweaked the button style a little to match the new spec. Help buttons in the
usual Firefox Suggest rows will get these tweaks too of course. The help button
(and block button) are now smaller, have smaller margins, and their hover
background color is the same as the color for rows.

Finally, I noticed we're not correctly updating `item[role]` when reusing a row
and going from without a help button to with a help button, or vice versa, so
this fixes that too.

Differential Revision: https://phabricator.services.mozilla.com/D138508
2022-02-17 05:02:41 +00:00
Butkovits Atila
2995e1b1c0 Backed out changeset 5d7859b835a5 (bug 1682681) for causing failures at browser_ext_contextMenus.js. CLOSED TREE 2022-02-12 03:45:02 +02:00
Shane Caraveo
14e7f84678 Bug 1682681 fix intermittent context menu failure on non-visible elements r=robwu
If elements added to the doc were not visible, context-click on
the element would fail because composedTarget.ownerDocument is null.

Differential Revision: https://phabricator.services.mozilla.com/D138190
2022-02-11 23:58:07 +00:00
Joel Maher
6d769aee7c Bug 1750839 - Enable fission browser-chrome for variants. r=mccr8,releng-reviewers,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D136512
2022-02-01 19:30:34 +00:00
William Durand
61759c7e90 Bug 1751154 - More consistent error handling for frameIds parameter in scripting API. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D137005
2022-01-28 19:13:05 +00:00
Shane Caraveo
afbca3636b Bug 1748524 sleep/waken functionality for background, restartable via persistent events r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D135812
2022-01-25 20:49:15 +00:00
Andrei Oprea
f64147a52f Bug 1746598 - Route MS messages to PB newtab r=dmose,extension-reviewers,rpl
Differential Revision: https://phabricator.services.mozilla.com/D134157
2022-01-25 13:02:30 +00:00
Barret Rennie
c7144b841e Bug 1745352 - Remove osfile.jsm from browser/components/extensions r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D133843
2022-01-25 12:16:17 +00:00
Marian-Vasile Laza
9447e468f8 Backed out changeset 2f4c63b2e472 (bug 1748524) for causing xpcshell failures on test_ext_alarms.js. CLOSED TREE 2022-01-25 01:26:30 +02:00
Shane Caraveo
64d3fc1694 Bug 1748524 sleep/waken functionality for background, restartable via persistent events r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D135812
2022-01-24 21:18:28 +00:00
Luca Greco
d34773dbd8 Bug 1746841 - Explicitly clear cached resources associated to an extension being installed/upgraded/downgraded or installed temporarily. r=mixedpuppy
This patch contains a proposed approach for the longer term fix we agreed on (see Bug 1746841 comment 10 and comment 11) and replace the
mochitest-browser added in the other patch attached to this bug with an xpcshell test (which besides covering the same base scenario
that mochitest-browser was convering, it is also lighter and covers also other cases that were not explicitly covered yet).

- added also an image to the test extension to explicitly verify the image caching behavior is also covered and works as expected
- added a test case to verify that cache images aren't cleared when the addon is permanently installed and it is not starting for an upgrade/downgrade

Differential Revision: https://phabricator.services.mozilla.com/D134508
2022-01-19 19:58:12 +00:00
Csoregi Natalia
705ffd58b4 Backed out 2 changesets (bug 1745352) for failures on test_ext_pkcs11_management.js. CLOSED TREE
Backed out changeset 0975c59084aa (bug 1745352)
Backed out changeset ba57b662bb72 (bug 1745352)
2022-01-19 06:16:46 +02:00
Barret Rennie
8df77245f5 Bug 1745352 - Remove osfile.jsm from browser/components/extensions r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D133843
2022-01-19 01:17:46 +00:00
Kershaw Chang
74a65c68ee Bug 1741425 - Enable more mochitest with socket process, r=ahal,webdriver-reviewers,preferences-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D134485
2022-01-11 09:49:45 +00:00