Commit Graph

1824 Commits

Author SHA1 Message Date
Stanca Serban
8afe90eead Backed out changeset 3adf002ab926 (bug 1805717) for searchMode mochitests related failures in browser_touchbar_searchrestrictions.js. CLOSED TREE 2022-12-20 07:07:55 +02:00
Daisuke Akatsuka
3bce4ac968 Bug 1805717: Introduce search_mode property. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D164794
2022-12-20 00:55:36 +00:00
Chris H-C
26fa403fe8 Bug 1792815 - Reintroduce handoff reporting for pbm-initiates searches r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164845
2022-12-19 18:43:58 +00:00
Daisuke Akatsuka
ea23c8fcc3 Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-19 03:32:17 +00:00
Norisz Fay
5cbd726d6d Backed out changeset d6454f53dcc0 (bug 1804314) for causing mochitest failures on browser_glean_telemetry CLOSED TREE 2022-12-19 01:40:31 +02:00
Daisuke Akatsuka
ab22a1563a Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-18 22:21:26 +00:00
Cristian Tuns
abdd8ae86a Backed out changeset e0677d0ad42a (bug 1803056) for causing mochitest failures on browser-tips/browser_searchTips.js CLOSED TREE 2022-12-16 19:34:12 -05:00
James Teow
263f550b16 Bug 1803056 - Prevent search tips from appearing when a new request is initiated - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D164459
2022-12-16 21:46:10 +00:00
Drew Willcoxon
a355f8ed5b Bug 1804353 - Don't select buttons on mousedown in the urlbar view. r=dao
This stops selecting buttons on mousedown so that selection and the input remain
in a sensible state after clicking the block button while top sites are showing
(e.g., in the weather suggestion).

This turned out to be surprisingly complicated, so please see the bug and code
comments for details. I think our selection logic is pretty brittle or at least
convoluted and could stand to be simplified, but I didn't want to make large
changes here. Ideally we wouldn't treat buttons any differently on mousedown --
so we'd select them too -- and it may be possible to do that while avoiding the
problems I talk about in the bug, but I don't think it's at all worth the
complexity that seems to be required.

I added a new task to the test Daisuke created in D155812.

Differential Revision: https://phabricator.services.mozilla.com/D164018
2022-12-16 02:58:15 +00:00
Drew Willcoxon
a3c39931b1 Bug 1805576 - Add back telemetry tests for improve_suggest_experience_checked = true. r=daleharvey
This adds checks to the main sponsored and nonsponsored tests to ensure we have
test cases where this value is both true and false. I think it's important to
have test cases for both sponsored and nonsponsored suggestions since these are
the two main types of Firefox Suggest suggestions. I don't think it's necessary
for other types of suggestions because they all use the same logic, so if these
checks pass for sponsored and nonsponsored suggestions, we can be reasonably
sure other suggestion types are handled correctly.

Differential Revision: https://phabricator.services.mozilla.com/D164617
2022-12-15 21:12:51 +00:00
Ben Hearsum
51079cd107 Bug 1804896: don't run update related tests against msix packages r=bytesized,application-update-reviewers
We don't use our updater in MSIX, no need to run the tests (which break various ways anyways).

Differential Revision: https://phabricator.services.mozilla.com/D164667
2022-12-15 14:30:10 +00:00
Emilio Cobos Álvarez
0f61b77b68 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
Iulian Moraru
929d19c3de Backed out 11 changesets (bug 1804903, bug 1804902, bug 1804900, bug 1804899, bug 1712329, bug 1804898, bug 1804894, bug 1804904, bug 1804896, bug 1804905) for breaking gecko decision task. CLOSED TREE
Backed out changeset 9e7813271e6b (bug 1712329)
Backed out changeset 29aa1d032dd3 (bug 1804903)
Backed out changeset 22ef0b00cc99 (bug 1804905)
Backed out changeset 8fad832a574e (bug 1804904)
Backed out changeset 60f185a3a485 (bug 1804902)
Backed out changeset 8b69824de6e2 (bug 1804900)
Backed out changeset 140f75f3f919 (bug 1804899)
Backed out changeset f4da44b1a219 (bug 1804898)
Backed out changeset 7cf946ae8295 (bug 1804896)
Backed out changeset 07d62af0767f (bug 1804894)
Backed out changeset 1e3e02cc3b1f (bug 1712329)
2022-12-15 03:16:41 +02:00
Ben Hearsum
53e4224334 Bug 1804896: don't run update related tests against msix packages r=bytesized,application-update-reviewers
We don't use our updater in MSIX, no need to run the tests (which break various ways anyways).

Differential Revision: https://phabricator.services.mozilla.com/D164667
2022-12-15 00:45:13 +00:00
Cristian Tuns
c9c42bc174 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
Dale Harvey
69a19c1c3f Bug 1805075 - Show QuickActions in actions search mode. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D164618
2022-12-14 10:33:21 +00:00
Emilio Cobos Álvarez
9a53f8dea3 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
Daisuke Akatsuka
98c1beeb43 Bug 1805321: Move initNimbusFeature() to UrlbarTestUtils r=adw
Differential Revision: https://phabricator.services.mozilla.com/D164529
2022-12-13 23:00:12 +00:00
Daisuke Akatsuka
302775a826 Bug 1804561: Handle the interaction type 'refined' as a subset of 'returned'. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D164180
2022-12-13 21:14:06 +00:00
Daisuke Akatsuka
fc77179b9f Bug 1805112: Make Nimbus experiments allow telemetry recording to be enabled. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D164427
2022-12-13 01:50:51 +00:00
Daisuke Akatsuka
968db5bed3 Bug 1803767: Enable needed quickactions prefs for browser-tips test. r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D164331
2022-12-11 18:49:11 +00:00
Drew Willcoxon
80ddf477dd Bug 1804807 - Refactor quick suggest telemetry tests. r=daleharvey
This refactors quick suggest telemetry tests. My goal is to make it really
simple to add tests for new types of suggestions, like dynamic Wikipedia and
weather.

I've split browser_quicksuggest_telemetry.js into different files, one per
suggestion type: sponsored, nonsponsored, and dynamic Wikipedia. I'm working on
a new file for weather in bug 1804536. There are two other files for other
telemetry that isn't primary or core telemetry. (In the patch, I cp'ed
browser_quicksuggest_telemetry.js to these two new files,
browser_telemetry_other.js and browser_telemetry_impressionEdgeCases.js.)

I named the new files browser_telemetry_foo.js. I don't think it's important to
keep the "quicksuggest" in their names because they're already in the
quicksuggest directory and these file names were starting to get long.

I added some automated telemetry helpers to head.js. They can be used to
declaratively define the primary telemetry that's expected for a particular
suggestion. The helpers automatically check all types of primary telemetry for
the suggestion: impression, click, help, and block. When we add a new suggestion
type, we can add a new file that uses these helpers, and hopefully it should be
pretty simple.

I also removed some tasks that in hindsight aren't important and/or are covered
by other tasks/tests.

All the changes from `http` to `https` in this revision are due to lint.

Depends on D162253

Differential Revision: https://phabricator.services.mozilla.com/D164307
2022-12-09 23:49:46 +00:00
Dale Harvey
31c13c0cd4 Bug 1800993 - Add telemetry for dynamic wikipedia results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D162253
2022-12-09 21:29:38 +00:00
Drew Willcoxon
05d8fae55e Bug 1804525 - Make weather suggestions blockable. r=daisuke
This makes the weather suggestion blockable. It depends on the new `isBlockable`
payload property added in D163766. The suggestion's row in the view will
automatically get a block button by setting that property.

We don't have an existing browser-chrome test for the block button by itself to
make sure picking it removes the row, so I added a task to
browser_remove_match.js.

The change to test_weather.js makes sure calling `blockResult()` on the provider
correctly disables the `suggest.weather` pref.

Depends on D163766

Differential Revision: https://phabricator.services.mozilla.com/D164120
2022-12-08 16:22:32 +00:00
Daisuke Akatsuka
e923349eb2 Bug 1803767: Enable needed quickactions prefs. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D163800
2022-12-08 03:34:36 +00:00
Sandor Molnar
b46f787337 Backed out changeset ba7612a763a0 (bug 1800993) for needing data-review. CLOSED TREE 2022-12-08 00:55:42 +02:00
Dale Harvey
05f278cf30 Bug 1800993 - Add telemetry for dynamic wikipedia results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D162253
2022-12-07 22:40:53 +00:00
Dale Harvey
1b99ac4f8c Bug 1783153 - Update strings and icons for Quickactions. r=daisuke,fluent-reviewers,desktop-theme-reviewers,flod,dao
Differential Revision: https://phabricator.services.mozilla.com/D158240
2022-12-07 20:28:43 +00:00
Daisuke Akatsuka
42601e6a91 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-07 06:35:50 +00:00
Drew Willcoxon
212d13a054 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
5ffe6e3698 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
f7f081c409 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
6d439f9c19 Backed out 2 changesets (bug 1800579) for causing mochitest failures on browser_glean_telemetry_impression_interaction.js
Backed out changeset 329d79c6403b (bug 1800579)
Backed out changeset 2796c110119d (bug 1800579)
2022-12-06 17:08:20 -05:00
Daisuke Akatsuka
6d66275743 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-06 20:48:39 +00:00
Cristian Tuns
63266cca48 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
e634925c17 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
965c6e86fc 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
Mark Banner
0cd6f3836f Bug 1804037 - Convert PartnerLinkAttribution.jsm to an ES module. r=adw,search-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D163814
2022-12-06 11:34:18 +00:00
Drew Willcoxon
efb97965be Bug 1804121 - When caching the top-sites context, check for the presence of a top-sites result anywhere in the list. r=daisuke
This fixes the bug, adds a task to the existing test, and improves the test by
not waiting for the search to finish before checking the view. It also
simplifies the test a little by collecting URLs from rows into an array and
using `Assert.deepEqual()` instead of comparing rows one by one.

Differential Revision: https://phabricator.services.mozilla.com/D163867
2022-12-06 04:53:38 +00:00
Ryan VanderMeulen
3b189f8efc Backed out changeset af2c13b9fdb7 (bug 1801244) per developer request. 2022-12-05 16:38:55 -05:00
James Teow
a7c0bdc10b Bug 1802564 - Toggle showSearchTerms to true on Nightly - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D163221
2022-12-03 02:24:49 +00:00
Daisuke Akatsuka
d82f055d58 Bug 1800414: Implement the abandonment event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D161977
2022-12-01 23:37:32 +00:00
Cristian Tuns
9796804d31 Backed out changeset b4f24df08c5a (bug 1802564) for causing bc failures on browser_glean_telemetry_engagement_interaction.js CLOSED TREE 2022-12-01 20:24:11 -05:00
James Teow
c0621f6f3d Bug 1802564 - Toggle showSearchTerms to true on Nightly - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D163221
2022-12-01 23:06:14 +00:00
Greg Tatum
44df4b67a8 Bug 1685180 - Remove test case for missing l10n args; r=nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D162597
2022-12-01 21:40:57 +00:00
Daisuke Akatsuka
238cee7905 Bug 1797265: Make user event fired while opening urlbar result by empty string be the target for interaction. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D162184
2022-12-01 12:05:49 +00:00
Daisuke Akatsuka
f12f72c9eb Bug 1797265: Implement the engagement event. r=mak,adw,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D160193
2022-12-01 12:05:48 +00:00
Mark Banner
319bc25bd8 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
Dale Harvey
b7f4d86bb1 Bug 1800630 - Don't show top pick result if heuristic url matches. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D162100
2022-11-28 11:50:08 +00:00
Barret Rennie
d1a2566d45 Bug 1541508 - Use Services.env in browser/ r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D160136
2022-11-25 19:09:06 +00:00