Commit graph

3740 commits

Author SHA1 Message Date
Rob Wu
bcc6eb3ead Bug 1827910 - Show deprecation warnings for browser_style in MV3 r=willdurand
This patch has no observable changes, other than printing deprecation
messages when browser_style is effectively true in MV3.

This patch does include the full logic for all stages of the deprecation
process behind prefs, which will follow the schedule described at:
https://bugzilla.mozilla.org/show_bug.cgi?id=1827910#c1.

All combinations of these prefs are fully covered by unit tests in
toolkit/components/extensions/test/xpcshell/test_ext_browser_style_deprecation.js
The next test tasks confirm the behavior of the current patch:
- browser_style_never_deprecated_in_MV2
- supported_with_browser_style_false
- supported_with_browser_style_true
- supported_with_mv2_defaults

Differential Revision: https://phabricator.services.mozilla.com/D176811
2023-05-04 16:29:07 +00:00
Cristian Tuns
b2d1a066fb Backed out changeset afc12be87873 (bug 1827910) for causing xpcshell failures in test_ext_browser_style_deprecation.js CLOSED TREE 2023-05-04 09:41:11 -04:00
Rob Wu
0a97f0ff94 Bug 1827910 - Show deprecation warnings for browser_style in MV3 r=willdurand
This patch has no observable changes, other than printing deprecation
messages when browser_style is effectively true in MV3.

This patch does include the full logic for all stages of the deprecation
process behind prefs, which will follow the schedule described at:
https://bugzilla.mozilla.org/show_bug.cgi?id=1827910#c1.

All combinations of these prefs are fully covered by unit tests in
toolkit/components/extensions/test/xpcshell/test_ext_browser_style_deprecation.js
The next test tasks confirm the behavior of the current patch:
- browser_style_never_deprecated_in_MV2
- supported_with_browser_style_false
- supported_with_browser_style_true
- supported_with_mv2_defaults

Differential Revision: https://phabricator.services.mozilla.com/D176811
2023-05-04 12:45:00 +00:00
William Durand
b1004312e2 Bug 1805924 - Allow to re-order the list of extensions in the unified extensions panel. r=rpl,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D175348
2023-05-04 06:11:44 +00:00
anwar
1dbd9bffb3 Bug 1829673 - Put all mochitest test manifest files under browser/components into alphabetical order. r=mconley,extension-reviewers,credential-management-reviewers,dimi,robwu
Differential Revision: https://phabricator.services.mozilla.com/D176459
2023-05-02 16:13:24 +00:00
Narcis Beleuzu
669e523fd3 Backed out 12 changesets (bug 1824112) for mochitest failures on test_autocomplete_autofill_related_realms_no_dupes.html . CLOSED TREE
Backed out changeset 1b884731cc88 (bug 1824112)
Backed out changeset a5c59331e797 (bug 1824112)
Backed out changeset fec2998bed4f (bug 1824112)
Backed out changeset 3b86742b481e (bug 1824112)
Backed out changeset fdf4845c5a44 (bug 1824112)
Backed out changeset 378d2832774b (bug 1824112)
Backed out changeset f24f6a88b9a0 (bug 1824112)
Backed out changeset dd3b06a85ac8 (bug 1824112)
Backed out changeset e19d6f69fd8a (bug 1824112)
Backed out changeset e96c54b21c45 (bug 1824112)
Backed out changeset b51f68d02f4c (bug 1824112)
Backed out changeset 30aa8323efcd (bug 1824112)
2023-05-02 15:02:59 +03:00
Johannes J. Schmidt
c092a4f20b Bug 1824112 - switch to addLoginAsync in tests r=credential-management-reviewers,sync-reviewers,sgalich,markh
Differential Revision: https://phabricator.services.mozilla.com/D175704
2023-05-02 09:22:07 +00:00
Itiel
8d2cfbb39d Bug 1818622 - More clean up to the unified extensions panel r=willdurand,mconley
Also, update also the menu button's class depending on its location. Update tests accordingly.

Differential Revision: https://phabricator.services.mozilla.com/D170828
2023-05-01 19:57:49 +00:00
Sandor Molnar
474b866f87 Backed out 3 changesets (bug 1824112) for causing failures related in toolkit/components/passwordmgr/<...> CLOSED TREE
Backed out changeset 54334826f02e (bug 1824112)
Backed out changeset 01a71441e86a (bug 1824112)
Backed out changeset 1d21bc78852c (bug 1824112)
2023-04-24 12:20:18 +03:00
Johannes J. Schmidt
3211c834ae Bug 1824112 - switch to addLoginAsync in tests r=credential-management-reviewers,sync-reviewers,sgalich,markh
Differential Revision: https://phabricator.services.mozilla.com/D175704
2023-04-24 07:52:22 +00:00
William Durand
45cd34a381 Bug 1801266 - Handle the case where an extension widget is not visible and not in the extensions panel. r=mconley,rpl
Differential Revision: https://phabricator.services.mozilla.com/D168532
2023-04-19 07:42:16 +00:00
Mathew Hodson
64cbc8d1e6 Bug 1824906 - Update consumers to use normandy ESM. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D175026
2023-04-16 18:01:55 +00:00
Drew Willcoxon
a3b0a1fd4c Bug 1827762 - Replace UrlbarProvider.pickResult() and blockResult() with onEngagement() r=mak
This removes `UrlbarProvider.pickResult()` and `blockResult()` in favor of
handling picks and dismissals through `onEngagement()`. A number of providers
use those two methods, so this revision touches a lot of files.

Handling dismissals through `onEngagement()` means `UrlbarInput.pickResult()`
can no longer tell whether a result is successfully dismissed, so it can't
remove the result anymore. (Maybe `onEngagement()` could return some value
indicating it dismissed the result, but I don't want to go down that road.)
Instead, I split `UrlbarController.handleDeleteEntry()` into two methods: a
public one that removes the result and notifies listeners, and a private one
that handles dismissing the selected result internally in
UrlbarController. Providers that have dismissable results should now implement
`onEngagement()` and call `controller.removeResult()`.

I made some other improvements to engagement handling. There's still room for
more but this patch is big enough already.

Other notable changes:

Include the engaged result in engagement notifications so providers have easy
access to it and can respond to clicks and dismissals more easily. That also
lets us stop passing `selIndex` and `provider` to `engagementEvent.record()`
since now it can compute those from the passed-in result.

Add the concept of `isSessionOngoing` to engagement notifications so providers
can tell whether an engagement ended the search session. Right now, providers
like quick suggest that record a bunch of provider-specific legacy telemetry
assume that `onEngagement()` ends the session, but that's no longer true.

Unify result buttons and result menu commands by setting
`element.dataset.command` on buttons (hopefully we can remove buttons soon, at
least the ones that aren't tip buttons)

Make sure we always notify providers on engagement even on dismissals or
when skipping legacy telemetry

Move dismissal of restyled search suggestions and history results from
`UrlbarController.handleDeleteEntry()` to the Places provider

Move dismissal of form history results from
`UrlbarController.handleDeleteEntry()` to the search suggestions provider

In the Places provider, remove the unused `_addSearchEngineMatch()` method. Also
remove the code in the "searchengine" case that creates a non-search-history
result. This code is unreached because the only time the provider creates a
"searchengine" match it also sets `isSearchHistory` to true.

In `UrlbarTestUtils.promiseAutocompleteResultPopup()`, change the default value
of the `fireInputEvent` param from false to true. This is necessary because
without a starting input event, the start event info in `engagementEvent` will
be null, so when `engagementEvent.record()` is called at the end of the
engagement, it will bail, and providers will not be notified of the engagement.
IMO true is a better default value anyway because input events will typically be
fired when the user performs a search.

Differential Revision: https://phabricator.services.mozilla.com/D174941
2023-04-13 06:03:33 +00:00
Emilio Cobos Álvarez
ba8392212e Bug 1826622 - Constrain autocomplete popup like select. r=Gijs,sgalich
Depends on D175039

Differential Revision: https://phabricator.services.mozilla.com/D175040
2023-04-11 19:59:06 +00:00
Ebilite Uchenna
8c931cb313 Bug 1824611 - Convert consumers of toolkit/components/passwordmgr to import ES modules directly. r=Standard8,credential-management-reviewers,settings-reviewers,fxview-reviewers,sclements,sgalich,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D174446
2023-04-11 19:06:24 +00:00
Tooru Fujisawa
611bc49dcf Bug 1821308 - Part 2: Convert ctypes.jsm consumers to use ESM. r=Standard8,geckoview-reviewers,application-update-reviewers,credential-management-reviewers,sgalich,bytesized,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D173811
2023-04-11 01:25:15 +00:00
Mark Banner
474708c181 Bug 1826702 - Convert PermissionTestUtils to an ES module. r=permissions-reviewers,settings-reviewers,media-playback-reviewers,pbz,padenot
Differential Revision: https://phabricator.services.mozilla.com/D174846
2023-04-06 15:07:56 +00:00
Tomislav Jovanovic
082bcb5dde Bug 1775565 - Use explicit startupReason in rowser_ext_openPanel.js test and re-enable, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D173150
2023-04-02 21:32:02 +00:00
Barret Rennie
a85bf46599 Bug 1788954 - Convert toolkit/components/nimbus to ES modules r=Standard8,pip-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D172850
2023-03-30 20:51:58 +00:00
CanadaHonk
91709586ba Bug 1801379 - Migrate Sinon.jsm to an ES module r=extension-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,fxview-reviewers,devtools-reviewers,Standard8,nchevobbe,sclements,dimi,mconley,bytesized,robwu
Migrated `testing/modules/Sinon.sys.mjs` to an ES module.

`testing` should now be 100% ESM 🎉

Differential Revision: https://phabricator.services.mozilla.com/D173643
2023-03-29 07:34:10 +00:00
William Durand
d3d33ab2db Bug 1822306 - Add Extension.getPreferredIcon() method and use it. r=zombie
It looks like `extension.iconURL` never worked. I added a `getPreferredIcon()`
that relies on `IconDetails.getPreferredIcon()` under the hood in order to
easily get icon URLs from an instance of an `Extension`. I updated a few places
where using this new method is a bit better.

Differential Revision: https://phabricator.services.mozilla.com/D173158
2023-03-27 11:04:50 +00:00
Gijs Kruitbosch
23b684669b Bug 1822037 - actually test that popup and options pages open links in tabs rather than their own browsers, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D173423
2023-03-24 12:57:38 +00:00
Gijs Kruitbosch
cafaec2490 Bug 1822037 - don't bother setting isAppTab for extension browsers, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D173089
2023-03-24 12:57:37 +00:00
Stephanie Cunnane
a67994520d Bug 1823278 - Update consumers of toolkit/components/utils to import ES modules directly. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172950
2023-03-22 02:02:51 +00:00
Kershaw Chang
5e58575e28 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-21 09:09:58 +00:00
William Durand
b9acf99c16 Bug 1820124 - Remove addonManager.action/link/view Telemetry events. r=rpl,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D171541
2023-03-20 20:11:15 +00:00
Stanca Serban
8af2c71296 Bug 1775565 - disable browser_ext_openPanel.js on linux, mac opt and win11_2009. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D172990
2023-03-20 14:12:04 +00:00
Mike Kaply
0088169e5e Bug 1813108 - Add support for pinning to ExtensionSettings policy. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D170949
2023-03-16 15:57:14 +00:00
Marian-Vasile Laza
fc37f993c4 Backed out changeset c24f7a077e5f (bug 1813108) for mochitest failures on test_ext_action.html. 2023-03-15 23:08:08 +02:00
Mike Kaply
a9973a08c2 Bug 1813108 - Add support for pinning to ExtensionSettings policy. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D170949
2023-03-15 19:18:44 +00:00
Luca Greco
e9e8593dbd Bug 1775577 - Prevent test_discarded_private_tab_restored from trying to discard the same tab twice. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D172154
2023-03-15 18:31:50 +00:00
Luca Greco
091f1c9442 Bug 1680419 - Explicitly wait for indentity-box mutation before asserting the identity-box/icon styles. r=Gijs
I wasn't able to hit this locally even when running the test with --verify, and in the failure logs from the
failures linked to orangefactor I couldn't find any that would provide me some clue of what is going on,
but if the identity box is being updates asynchronously then I would not exclude this may be hit only in
some cases that are never hit locally by executing this test file on its own.

This patch adds a few small changes to explicitly wait for a mutation of the identity box before asserting
the styles, the test was still passing consistently locally and so if this version would fail for
a timeout due to get stuck waiting for the mutation, then we would at least determine that the identity
box would very likely never be updated and there may be something else going on that may be worth digging
further into.

Differential Revision: https://phabricator.services.mozilla.com/D171497
2023-03-15 15:07:03 +00:00
Tomislav Jovanovic
2aafabeb86 Bug 1819176 - Set default extension.startupReason for our tests, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D171169
2023-03-15 12:18:25 +00:00
Luca Greco
ebac80c11a Bug 1819794 - Ensure userContextId is set in the session store tab state for tabs created as discarded. r=Gijs,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D171570
2023-03-15 11:47:01 +00:00
Iulian Moraru
e1a2d9853c Backed out changeset 16cc818fba27 (bug 1819176) for causing frequent failures on browser_ext_themes_getCurrent_differentExt.js. CLOSED TREE 2023-03-15 05:15:03 +02:00
Tomislav Jovanovic
a16d3fadf6 Bug 1819176 - Set default extension.startupReason for our tests, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D171169
2023-03-14 20:57:02 +00:00
Stanca Serban
47aea2f603 Backed out changeset aa406ef74561 (bug 1811326) for causing mochitests failures in browser_ext_windows_update.js. CLOSED TREE 2023-03-14 13:18:36 +02:00
YUKI "Piro" Hiroshi
92500a956f Bug 1811326 - Place windows larger than screen inside screen always r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D170156
2023-03-14 09:38:29 +00:00
Gijs Kruitbosch
f64b33fbe8 Bug 1718082 - move isAppTab from docshell to browsing context, r=nika,rpl
Differential Revision: https://phabricator.services.mozilla.com/D171412
2023-03-13 17:32:07 +00:00
Marian-Vasile Laza
ee72efd1e9 Backed out 5 changesets (bug 1809843) for causing Cargo related build bustages. CLOSED TREE
Backed out changeset 5c494680f448 (bug 1809843)
Backed out changeset 02742b38edab (bug 1809843)
Backed out changeset 2b9b32ca8294 (bug 1809843)
Backed out changeset 56631cb02ae6 (bug 1809843)
Backed out changeset 37e35a60a71f (bug 1809843)
2023-03-13 13:53:26 +02:00
Kershaw Chang
a60df34ad0 Bug 1809843 - Skip Failed tests, r=necko-reviewers,extension-reviewers,credential-management-reviewers,valentin,sgalich,robwu
Differential Revision: https://phabricator.services.mozilla.com/D171842
2023-03-13 11:12:33 +00:00
Sandor Molnar
b23bf18eed Backed out changeset 6ac0d009f1ef (bug 1810306) for causing bc failures in browser/components/extensions/test/browser/browser_ext_sidebarAction_context.js CLOSED TREE 2023-03-10 18:15:33 +02:00
kernp25
a11e1155cc Bug 1810306 - Stop setting icon on menuitem in the View->Show Sidebars menu. r=desktop-theme-reviewers,mixedpuppy,dao
Differential Revision: https://phabricator.services.mozilla.com/D166871
2023-03-10 15:00:39 +00:00
Dão Gottwald
0e678372a8 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 12:02:13 +00:00
Luca Greco
cb91245a15 Bug 1775577 - Remove tabs.onUpdated listener in test_discarded_private_tab_restored after discarding a tab. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D171507
2023-03-03 10:49:52 +00:00
Stanca Serban
34582cc569 Bug 1780998 - disable browser_ext_windows_update.js on mac 10.15 debug. r=intermittent-reviewers,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D170314
2023-02-25 18:42:24 +00:00
William Durand
dfd1e7b265 Bug 1800417 - Add a test case with two windows. r=rpl
Depends on D162712

Differential Revision: https://phabricator.services.mozilla.com/D170044
2023-02-22 10:03:39 +00:00
Mark Banner
8acde8d74e Bug 1816934 - Update consumers of services/settings to import ES modules directly. r=leplatrem,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,robwu
Differential Revision: https://phabricator.services.mozilla.com/D169934
2023-02-17 19:32:06 +00:00
Rob Wu
e52e35b970 Bug 1784662 - Reduce time spent in browser_ext_omnibox.js test r=willdurand,adw
This is a test-only change. It introduces a new Urlbar pref to make the
existing 3000 ms timeout configurable.

That timeout is currently reached 8 times in the test. That means that
the test will take at least 3 x 8 = 24 seconds to run while basically
doing nothing, and makes the test prone to reach the deadline by which
the test is declared timed-out.

To avoid "Test timed out" errors, the test now reduces the fixed 3000 ms
timeout to 500 ms, so now we wait for 8x500 = 4 seconds instead of 24.

Differential Revision: https://phabricator.services.mozilla.com/D169846
2023-02-17 18:20:01 +00:00
Cristian Tuns
b3bf09cc0d Backed out 6 changesets (bug 1816934, bug 1817182, bug 1817179, bug 1817183) for causing dt failures in browser_jsterm_autocomplete_null.js CLOSED TREE
Backed out changeset 17d4c013ed92 (bug 1817183)
Backed out changeset cfed8d9c23f3 (bug 1817183)
Backed out changeset 62fe2f589efe (bug 1817182)
Backed out changeset 557bd773fb85 (bug 1817179)
Backed out changeset 7f8a7865868b (bug 1816934)
Backed out changeset d6c1d4c0d2a0 (bug 1816934)
2023-02-17 10:51:33 -05:00
Mark Banner
aec4c1293b Bug 1816934 - Update consumers of services/settings to import ES modules directly. r=leplatrem,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,robwu
Differential Revision: https://phabricator.services.mozilla.com/D169934
2023-02-17 09:01:43 +00:00
William Durand
845d0abe27 Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Depends on D169810

Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-02-16 12:03:07 +00:00
Cristian Tuns
dca219aa17 Backed out changeset e391918bb558 (bug 1800417) for causing mochitest failures in /browser_unified_extensions_overflowable_toolbar.js CLOSED TREE 2023-02-14 17:21:09 -05:00
William Durand
56b7ce8ff1 Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Depends on D169810

Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-02-14 20:51:53 +00:00
William Durand
afb04b5962 Bug 1800417 - Make sure we exit customization mode in browser_unified_extensions_cui.js. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D169810
2023-02-14 14:24:08 +00:00
Malte Jürgens
823fc578cb Bug 1808459 - Take extensions.getAddons.showPane into consideration when clicking on empty unified extensions button r=extension-reviewers,robwu
In case the user does not have any active extensions listed, if `extensions.getAddons.showPane` is set to true (default), clicking on the unified extensions button will lead to the recommendations section in about:addons. If it is set to false, clicking the button will now lead to the extension list instead of the, disabled by the user, recommendations section.

Differential Revision: https://phabricator.services.mozilla.com/D169570
2023-02-14 13:07:22 +00:00
William Durand
df058e1a80 Bug 1775556 - Fix intermittent browser/components/extensions/test/browser/browser_ext_browserAction_contextMenu.js. r=rpl
The screenshot in one of the failed jobs made me think that we should
probably close the browser action popup when we open it.

Differential Revision: https://phabricator.services.mozilla.com/D169636
2023-02-14 10:58:36 +00:00
Gijs Kruitbosch
c41ccf9cc7 Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 23:50:40 +00:00
Gijs Kruitbosch
af5efe85b1 Bug 1810141 - fix replaceUrlInTab webextension utility to deal with loadURI changes, r=rpl
Depends on D168392

Differential Revision: https://phabricator.services.mozilla.com/D168393
2023-02-13 23:50:39 +00:00
Marian-Vasile Laza
e39c51f7fd Backed out changeset d26e7747cf69 (bug 1800417) for bc failures on browser_unified_extensions_overflowable_toolbar.js. CLOSED TREE 2023-02-13 22:14:44 +02:00
William Durand
315bd9a1a1 Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-02-13 16:52:18 +00:00
Cristina Horotan
5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch
bb42efb76d Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 12:55:25 +00:00
Gijs Kruitbosch
55af443c42 Bug 1810141 - fix replaceUrlInTab webextension utility to deal with loadURI changes, r=rpl
Depends on D168392

Differential Revision: https://phabricator.services.mozilla.com/D168393
2023-02-13 12:55:24 +00:00
William Durand
db7abed7c2 Bug 1782359 - Fix intermittent browser/components/extensions/test/browser/browser_ext_activeScript.js, again. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D169305
2023-02-09 12:38:45 +00:00
William Durand
d1c53f86f9 Bug 1798683 - Fix intermittent browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js. r=rpl CLOSED TREE
This patch attempts to fix intermittent failures by:

1. using `ensureMaximizedWindow()` where appropriate. While nothing
   seemed wrong per se with the previous approach, resizing to the
   original height was done to restore the previous window dimensions.
   Since the window is maximized before, it makes sense to reuse this
   helper function, especially given that it is a bit more robust than
   just awaiting an event.
2. not awaiting the `resize` event, which does not seem to be fired all
   the time when `resizeBy()` is used. It was mostly fine, except when
   it wasn't... Since we have a `.waitForCondition()` call right after,
   we can probably skip the await of this event.

Differential Revision: https://phabricator.services.mozilla.com/D169088
2023-02-08 09:52:44 +00:00
Sandor Molnar
5aff50ce87 Backed out changeset 549ce0549c2e (bug 1800417) for causing bc failures in browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js CLOSED TREE 2023-02-08 14:23:39 +02:00
Luca Greco
6811654c9d Bug 1788204 - Fix frequent intermittent browser_ext_windows_create.js failures on macos. r=willdurand
I've been tried to bisect if this intermittent has been raising in intermittency due to some change on the
Firefox side, but I kept hitting this failure locally on macos artifiacts debug buils consistently when
using --verify even when I went month back in mozilla-central revisions, which seems to suggest that
this particular intermittent failure have been around for a while and increased in frequency either
for some small timing changes that increased the change of hitting it in a debug build (either on the
Firefox or macOS windows management side), which is not going to be easy to confirm or bisect precisely.

Interestingly when the same test file runs locally on macos using --headless along with --verify, the test
is passing consistently (which makes me thing that the issue may be hit because a browser window created
as fullscreen may be transitioning to fullscreen state asynchronously enough to not be always be in fullscreen
mode by the time browser.window.create resolves the new window details and we hit the intermittent assertion
failure).

As an alternative to skip the entire test file on macos debug builds, this patch includes
a small change to the test case that makes sure that if the test is running on macos and the
new window state is not fullscreen as requested, it wait until it gets to the fullscreen state.

This change was enough to pass --verify locally on macos, and so it also confirms that the newly created
window is getting to the fullscreen state at some point even when it wasn't yet in the fullscreen state
by the time browser.windows.create resolves.

Differential Revision: https://phabricator.services.mozilla.com/D169108
2023-02-08 12:09:31 +00:00
Sandor Molnar
36677e335e Backed out changeset 1b8f8c838a20 (bug 1798683) for causing bc failures in browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js CLOSED TREE 2023-02-08 14:03:39 +02:00
William Durand
84dc10e35a Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Depends on D169088

Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-02-08 10:25:02 +00:00
Sandor Molnar
8539240aed Backed out changeset 6dbcf3dd30c4 (bug 1800417) for causing bc failures in browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js CLOSED TREE 2023-02-08 13:54:33 +02:00
William Durand
3ab4cbac72 Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Depends on D169088

Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-02-08 10:25:02 +00:00
William Durand
6df2779799 Bug 1798683 - Fix intermittent browser/components/extensions/test/browser/browser_unified_extensions_overflowable_toolbar.js. r=rpl
This patch attempts to fix intermittent failures by:

1. using `ensureMaximizedWindow()` where appropriate. While nothing
   seemed wrong per se with the previous approach, resizing to the
   original height was done to restore the previous window dimensions.
   Since the window is maximized before, it makes sense to reuse this
   helper function, especially given that it is a bit more robust than
   just awaiting an event.
2. not awaiting the `resize` event, which does not seem to be fired all
   the time when `resizeBy()` is used. It was mostly fine, except when
   it wasn't... Since we have a `.waitForCondition()` call right after,
   we can probably skip the await of this event.

Differential Revision: https://phabricator.services.mozilla.com/D169088
2023-02-08 09:52:44 +00:00
William Durand
3e2592f774 Bug 1782359 - Fix intermittent browser/components/extensions/test/browser/browser_ext_activeScript.js. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D169048
2023-02-07 10:35:26 +00:00
Gregory Pappas
49de99751d Bug 1811274 - Add disposition property to browser.search.search r=robwu
Depends on D164700

Differential Revision: https://phabricator.services.mozilla.com/D168206
2023-02-02 21:47:27 +00:00
Gregory Pappas
b4f9754abc Bug 1804357 - Implement browser.search.query r=robwu,search-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164700
2023-02-02 21:47:27 +00:00
Gijs Kruitbosch
efef52fc92 Bug 1795255 - autofix duplicate imports in tests under browser/, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D166179
2023-01-31 11:48:41 +00:00
Gijs Kruitbosch
c906d6f529 Bug 1795255 - manual fixes for tests that break after applying this lint rule, r=Standard8,necko-reviewers,extension-reviewers,credential-management-reviewers,sgalich,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D167802
2023-01-31 11:48:41 +00:00
Rob Wu
0c3022d4ac Bug 1811459 - Avoid _moveOutKids on disconnected panelmultiview r=Gijs,rpl
`this.forNode` (with `this` being a `PanelMultiView` instance) may
return a node that was already disconnected before, in which case its
`node` member will be void. To avoid unexpected promise rejections, add
a null check before `_moveOutKids()`.

Differential Revision: https://phabricator.services.mozilla.com/D167369
2023-01-30 14:43:24 +00:00
Butkovits Atila
d94887c64b Backed out changeset ab00cf793f29 (bug 1800417) for causing failures at browser_unified_extensions_overflowable_toolbar.js. 2023-01-30 17:34:14 +02:00
William Durand
70d0fbbc13 Bug 1800417 - Fix the use of both toolbarbutton-1 and subviewbutton CSS classes in extension widgets. r=Itiel,mconley,dao,rpl
Differential Revision: https://phabricator.services.mozilla.com/D162712
2023-01-30 13:36:07 +00:00
William Durand
78b4cceb88 Bug 1811128 - Use 16/32px extension icons in toolbars. r=rpl,dao
Differential Revision: https://phabricator.services.mozilla.com/D167573
2023-01-30 10:46:12 +00:00
Tomislav Jovanovic
6bed99e772 Bug 1805523 - Implement temporary access state and attention, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D165490
2023-01-24 00:47:13 +00:00
Emilio Cobos Álvarez
9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
William Durand
8a33fe0db5 Bug 1801540 - Clean-up unified extensions CSS after it ships by default. r=Itiel,desktop-theme-reviewers
Depends on D166934

Differential Revision: https://phabricator.services.mozilla.com/D167378
2023-01-23 21:31:18 +00:00
Dão Gottwald
05e5fefb46 Bug 1810647 - Prepare for enable urlbar result menu in Nightly. r=mak,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D167004
2023-01-23 15:54:53 +00:00
William Durand
a1f393ad66 Bug 1799009 - Remove gUnifiedExtensions.isEnabled. r=rpl,mconley
Depends on D166923

Differential Revision: https://phabricator.services.mozilla.com/D166934
2023-01-23 10:39:29 +00:00
William Durand
242047174f Bug 1799009 - Remove promiseEnableUnifiedExtensions() in test files. r=mconley,rpl
Depends on D166908

Differential Revision: https://phabricator.services.mozilla.com/D166923
2023-01-23 10:39:29 +00:00
Rob Wu
e55c7738f3 Bug 1811078 - Resolve some intermittent failures in browser_ext_incognito_views.js r=rpl
- Explicitly wait for popup close (via port.onDisconnect) before
  checking whether the popup is closed.

- On --headless (MOZ_HEADLESS), explicitly close the popup since that
  does not automatically happen for some unknown reason. Test case:
  ./mach test browser/components/extensions/test/browser/browser_ext_incognito_views.js --headless

- Explicitly wait for popup close (via port.onDisconnect) before
  closing the final private window. While this is mainly meant as
  a work-around for bug 1800100, it also helps with reducing the
  impact of bug 1811071 (follow up in bug 1811459).

Differential Revision: https://phabricator.services.mozilla.com/D167190
2023-01-20 12:14:59 +00:00
Gijs Kruitbosch
9946c4fcbb Bug 1810995 - update BrowserTestUtils.loadURI consumers to use loadURIString (automated) - browser - r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D167153
2023-01-19 20:16:42 +00:00
Oriol Brufau
8a2cc04f6c Bug 1809364 - Make tabs.move on multiple tabs more reliable (2). r=robwu
Bug 1323311 tried to improve browser.tabs.move, but the logic didn't
really make sense (e.g. why use 2 different maps to track indices?),
and it broke moving multiple tabs between windows: they would appear
in the wrong order.

Differential Revision: https://phabricator.services.mozilla.com/D166405
2023-01-19 13:51:31 +00:00
William Durand
09093658ff Bug 1799009 - Remove unified extensions pref and non-unified extensions variants from test suite. r=rpl,mconley,fluent-reviewers,desktop-theme-reviewers,Itiel
This patch removes the use of the "unified extensions" pref and adjust
the existing tests. More clean-ups will be done in follow-ups, e.g. the
removal of `gUnifiedExtensions.isEnabled` and some test-only changes to
no longer create a new window in each test file.

Differential Revision: https://phabricator.services.mozilla.com/D166908
2023-01-19 10:59:25 +00:00
Dão Gottwald
477eb99f64 Bug 1801298 - Fix down/up arrow behavior with multiple selectable elements per row. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166803
2023-01-19 10:26:53 +00:00
Sandor Molnar
af55a388e5 Backed out changeset 357170b2f52a (bug 1801298) for causing bc failures in browser/components/urlbar/tests/browser-tips/browser_selection.js CLOSED TREE 2023-01-19 12:00:27 +02:00
Dão Gottwald
8881cfae2a Bug 1801298 - Fix down/up arrow behavior with multiple selectable elements per row. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166803
2023-01-19 08:25:15 +00:00
Rob Wu
ef22954d6c Bug 1810732 - Set pref to enable openPopup in browser_ext_incognito_views.js r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D167170
2023-01-18 19:30:03 +00:00
Alexandre Poirot
c984f94118 Bug 1809848 - [devtools] Remove TargetMixin.isLocalTab/localTab attributes. r=devtools-reviewers,nchevobbe
They should rather be queried on the descriptor front.

Differential Revision: https://phabricator.services.mozilla.com/D166647
2023-01-18 12:32:03 +00:00
Butkovits Atila
4b6832ec0c Backed out 4 changesets (bug 1809848) for causing failures at browser_toolbox_options_disable_js. CLOSED TREE
Backed out changeset 7dfd8676b3c7 (bug 1809848)
Backed out changeset 78375e26bffe (bug 1809848)
Backed out changeset 17b823d1492e (bug 1809848)
Backed out changeset 05e57c08310f (bug 1809848)
2023-01-17 20:23:43 +02:00
Alexandre Poirot
f105170dd5 Bug 1809848 - [devtools] Remove TargetMixin.isLocalTab/localTab attributes. r=devtools-reviewers,nchevobbe
They should rather be queried on the descriptor front.

Differential Revision: https://phabricator.services.mozilla.com/D166647
2023-01-17 16:34:01 +00:00
Marian-Vasile Laza
c4e8bd42d6 Backed out 4 changesets (bug 1809848) for causing damp failures on browser-toolbox.js. CLOSED TREE
Backed out changeset 14b861cccbeb (bug 1809848)
Backed out changeset 92d5cc5ee69e (bug 1809848)
Backed out changeset 9bb5167ebc4b (bug 1809848)
Backed out changeset cdd531783324 (bug 1809848)
2023-01-17 11:16:20 +02:00
Alexandre Poirot
993faf67d5 Bug 1809848 - [devtools] Remove TargetMixin.isLocalTab/localTab attributes. r=devtools-reviewers,nchevobbe
They should rather be queried on the descriptor front.

Differential Revision: https://phabricator.services.mozilla.com/D166647
2023-01-16 22:25:07 +00:00
Mark Banner
d691c51a0d Bug 1808173 - Convert prompts imports to direct ES imports. r=Gijs,webdriver-reviewers,necko-reviewers,application-update-reviewers,credential-management-reviewers,valentin,whimboo,dimi,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D165794
2023-01-16 13:32:20 +00:00
Gregory Pappas
73dd4f40ab Bug 1680606 - Add matchDiacritics option to Find API r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D166875
2023-01-16 12:23:32 +00:00
Qijia Liu
745f04c5b8 Bug 1810076 - Fix promise constructor anti-pattern in ExtensionControlledPopup.jsm. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D166762
2023-01-16 12:22:04 +00:00
Rob Wu
55e268bce0 Bug 1808921 - Fix intermittent incorrect window in browser_ext_incognito_views.js r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D166235
2023-01-15 13:35:51 +00:00
Dave Townsend
b752598495 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2023-01-07 17:53:19 +00:00
Oriol Brufau
ef235398aa Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Unlike allowInheritPrincipal, skipLoad sets the nodefaultsrc attribute.
This avoids a load instead of falling back to about:blank.

One consequence of that is that switching to a lazy about:blank tab will
not notify invoke listeners registered with addTabsProgressListener
(listeners registered with addProgressListener will still be invoked).

Thus test browser_open_in_lazy_tab.js needs to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 13:51:47 +00:00
Sandor Molnar
198b27b6ab Backed out changeset 2b67bd0dd255 (bug 1808615) for causing bc failures in browser/components/customizableui/test/browser_open_in_lazy_tab.js CLOSED TREE 2023-01-07 03:18:23 +02:00
Oriol Brufau
8f8fe7e93f Bug 1808615 - Make addTab default skipLoad to createLazyBrowser. r=Gijs,extension-reviewers,nika,robwu
And make callers rely on that instead of allowInheritPrincipal when
creating lazy tabs.

Differential Revision: https://phabricator.services.mozilla.com/D166012
2023-01-07 00:37:36 +00:00
Alexandre Poirot
b94f2471fe Bug 1807937 - [devtools] Always use gDevTools.showToolboxForWebExtension to open Web extension toolboxes. r=devtools-reviewers,extension-reviewers,jdescottes
Let this test use the same codepath as production codepath used by about:debugging.

Differential Revision: https://phabricator.services.mozilla.com/D165718
2023-01-05 17:37:57 +00:00
Luca Greco
8c79b6af4a Bug 1807961 - Fix browser_unified_extensions.js failures hit due to moving/resizing windows being asynchronous. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D165689
2023-01-03 12:39:55 +00:00
Gregory Pappas
7f4fd78b1a Bug 1707405 - Make bookmarkId optional r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D165790
2023-01-03 09:03:17 +00:00
Marian-Vasile Laza
1ae4193d1b Backed out changeset 1c135e14142e (bug 1805523) for causing bc failures on browser_ext_windows_create_tabId.js. 2023-01-02 16:34:38 +02:00
Gregory Pappas
2978c6e2e9 Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2023-01-02 13:32:42 +00:00
Tomislav Jovanovic
e08a053a86 Bug 1805523 - Implement temporary access state and attention, r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D165490
2023-01-01 21:46:00 +00:00
Mark Banner
8730eec697 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Emilio Cobos Álvarez
b8a0c9a742 Bug 1805500 - Implement panel borders in cocoa using a border rather than shadow. r=mstange,extension-reviewers
My guess is that it was done using shadows to not interfere with the
native look, but actually this just works even with native-looking menus
(like the <select> menulist), because the background-color for those is
set on the menupopup, rather than the ::part(content).

So those have effectively 1px of extra padding (due to the transparent
border), but that seems barely perceptible, and worth the consistency
and simplification.

Differential Revision: https://phabricator.services.mozilla.com/D164716
2022-12-17 01:45:05 +00:00
Emilio Cobos Álvarez
a14c746228 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-15 03:11:55 +00:00
Tomislav Jovanovic
8d08b80dcd Bug 1798695 - Use WebExtensionPolicy to get list of active extensions r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D162570
2022-12-14 17:56:29 +00:00
Mark Banner
640699e64b Bug 1801813 - Improve search engine load path reporting for add-ons, user and enterprise policy engines. r=mcheang,settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D162700
2022-12-14 15:12:10 +00:00
Cristian Tuns
b638ccfac9 Backed out 2 changesets (bug 1805415) for causing dt failures on browser_net_telemetry_throttle_changed.js CLOSED TREE
Backed out changeset 5056d7df9f1e (bug 1805415)
Backed out changeset e13513500184 (bug 1805415)
2022-12-14 08:52:21 -05:00
Emilio Cobos Álvarez
be1f057109 Bug 1805415 - Use activateItem() rather than click() to activate menuitems. r=Gijs,extension-reviewers,pip-reviewers,search-reviewers
Bug 1805414 will move menu event handling to the DOM.

With that change the current synthetic click behavior of XUL menuitems
breaks. On current central, we rely on nsMenuFrame::HandleEvent not
getting called at all for synthetic clicks, and instead we just fire a
command event synchronously here:

  https://searchfox.org/mozilla-central/rev/a0d4f8f112c5c792ae272bf6ce50763ddd23ffa2/dom/xul/nsXULElement.cpp#1071

After my patch the command event is fired properly (potentially
asynchronously too) by the regular menu activation machinery, which is
preferable.

 * They fire a command event synchronously (even though on some
   platforms like macOS activating a context menu item is async).

 * They use a totally different codepath from what a user does.

 * They don't deal with native menus, etc.

We have a proper API for this (activateItem) which takes a much more
closer codepath to what users do, requires that the menu is shown, etc.
Use that API instead for testing.

As a benefit, tests now do not need to close the context menu manually
when clicking on a menu item (because we trigger the same code path as
users clicking the menu).

Differential Revision: https://phabricator.services.mozilla.com/D164567
2022-12-14 10:25:17 +00:00
Nika Layzell
4cd44adcb3 Bug 1800149 - Part 1: Stop sending some values from a content process in nsContextMenu, r=Gijs,extension-reviewers,robwu
Currently we are sending some values, such as principals, from the content
process when creating a nsContextMenu. This information is already available in
the parent process on WindowGlobalParent, so changes the code to fetch the
values from there instead.

Differential Revision: https://phabricator.services.mozilla.com/D161835
2022-12-13 18:35:18 +00:00
Stanca Serban
bd29139bde Backed out changeset 514642d76faa (bug 1792138) for causing mochitests failures in test_ext_protocolHandlers.html. CLOSED TREE 2022-12-13 14:53:38 +02:00
Dave Townsend
e021cf6a60 Bug 1792138: Show the extension's name in permission prompts for opening external links. r=ckerschb,robwu,fluent-reviewers,pbz,flod
In order to handle the content script case correctly we must expose the
contentScriptAddonPolicy to JavaScript. With that we can always see what
extension is trying to perform an action and use its name rather than internal
ID in the dialog.

Differential Revision: https://phabricator.services.mozilla.com/D161282
2022-12-13 10:43:32 +00:00
Sandor Molnar
3cc09e2ecd Backed out 2 changesets (bug 1800149) for causing mochitest failures in browser/base/content/test/referrer/browser_referrer_open_link_in_container_tab2.js CLOSED TREE
Backed out changeset 93299d2ad98a (bug 1800149)
Backed out changeset 0873ce3fa677 (bug 1800149)
2022-12-13 04:28:40 +02:00
Nika Layzell
ecbfe14912 Bug 1800149 - Part 1: Stop sending some values from a content process in nsContextMenu, r=Gijs,extension-reviewers,robwu
Currently we are sending some values, such as principals, from the content
process when creating a nsContextMenu. This information is already available in
the parent process on WindowGlobalParent, so changes the code to fetch the
values from there instead.

Differential Revision: https://phabricator.services.mozilla.com/D161835
2022-12-12 23:41:22 +00:00
Andrew Halberstadt
ad3a7c0431 Bug 1802323 - Add more logging to History cleaner in Sanitizers. r=Gijs,hpeuckmann,extension-reviewers,rpl
Makes passing a progress object as part of options more coherent in the
Sanitizer, so we don't need to null check it everywhere.
Create a sub progress object for each cleaner, so they don't overwrite each
other reusing the same property names (like "step"), since all the cleaners are
started in parallel.
Add a few steps to the history cleaner.

This also fixes a typo in the openWindows cleaner, that should receive an object
rather than a string as second argument. Adding a test for this feature is not
trivial, thus I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1803174.

Differential Revision: https://phabricator.services.mozilla.com/D163352
2022-12-12 17:16:51 +00:00
Drew Willcoxon
43b648c36b Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 18:43:49 -05:00
Noemi Erli
42fd111277 Backed out changeset e0eac08ef8bc (bug 1803873) fo causing failures in browser_search_telemetry_sources_navigation CLOSED TREE 2022-12-07 01:24:44 +02:00
Drew Willcoxon
b080ee4b3a Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 22:28:55 +00:00
Cristian Tuns
1942c132b0 Backed out changeset 263fffe843be (bug 1803873) for causing mochitest failures on browser_test_focus_urlbar.js CLOSED TREE 2022-12-06 15:10:09 -05:00
Drew Willcoxon
a2e3d559b4 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 16:35:31 +00:00
Gijs Kruitbosch
38d4b2f917 Bug 1803158 - convert session restore consumers to reference the sys.mjs files instead, r=webdriver-reviewers,perftest-reviewers,extension-reviewers,credential-management-reviewers,Standard8,sgalich,whimboo,sparky,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163350
2022-12-06 16:02:03 +00:00
Butkovits Atila
161cf57d1e Backed out changeset 470fffc6ff9a (bug 1772166) for causing failures at browser_ext_webNavigation_onCreatedNavigationTarget.js. CLOSED TREE 2022-12-06 16:44:41 +02:00
Gregory Pappas
e2262d2d4f Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2022-12-06 13:22:09 +00:00
Sandor Molnar
2568f380d9 Backed out changeset 26d4da528112 (bug 1772166) for causing bc failures in browser/components/extensions/test/browser/browser_ext_webNavigation_onCreatedNavigationTarget.js CLOSED TREE 2022-12-05 18:26:15 +02:00
William Durand
56d0a1a1ee Bug 1802925 - Update attention dot when (un)pinning extensions. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D163580
2022-12-05 14:55:51 +00:00
Gregory Pappas
59c59322a3 Bug 1478095 - Implement 'SuggestResult.deletable' and 'omnibox.onDeleteSuggestion' r=mixedpuppy,adw
Differential Revision: https://phabricator.services.mozilla.com/D159475
2022-12-05 14:50:57 +00:00
Gregory Pappas
daa7bef032 Bug 1772166 - Implement 'ZoomSettings.defaultZoomFactor' r=mixedpuppy,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158731
2022-12-05 14:49:40 +00:00
William Durand
731422dcdf Bug 1803650 - Remove setAttribute() since the label is updated with Fluent. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D163629
2022-12-02 20:31:49 +00:00
Tomislav Jovanovic
d08d9a2bc7 Bug 1801336 - Don't show hover run message for mv2 without browser action r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163333
2022-12-01 13:53:21 +00:00
Tomislav Jovanovic
5af8d4f83a Bug 1791370 - Ensure proper order of startup cache clearing and saving, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D163277
2022-11-29 21:58:15 +00:00
Luca Greco
4ca6302751 Bug 1775555 - Fix high frequency intermittent failures hit by browser_ext_browserAction_context.js. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163137
2022-11-29 16:30:08 +00:00
Mark Banner
95357f3083 Bug 1802855 - Convert toolkit/components/satchel JSM modules to ES modules. r=credential-management-reviewers,daleharvey,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D163201
2022-11-29 15:53:20 +00:00
Cristian Tuns
e6e6c0b360 Backed out changeset 50a57a750043 (bug 1791370) for private browsing failures on browser_html_detail_view.js. CLOSED TREE 2022-11-29 11:01:38 -05:00
Tomislav Jovanovic
33e3698190 Bug 1791370 - Ensure proper order of startup cache clearing and saving, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D163277
2022-11-29 14:08:00 +00:00
William Durand
269939beda Bug 1800109 - Add a test that checks that overflowed toolbar items in the addons area can be unpinned via a context menu. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D163244
2022-11-28 20:24:59 +00:00
Mike Conley
46cdc01d7b Bug 1801514 - Make sure addons panel hides when entering customize mode. r=willdurand
Differential Revision: https://phabricator.services.mozilla.com/D163013
2022-11-28 16:24:09 +00:00
William Durand
53f1947802 Bug 1802574 - Maximize window to prevent intermittents. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D163176
2022-11-28 12:44:50 +00:00