Commit graph

1019 commits

Author SHA1 Message Date
Drew Willcoxon
bc2e6501df Bug 1699227 - Support negative suggestedIndex values to allow indexes to be specified from the end of the list of urlbar results. r=mak
Given the result span problem described in bug 1699211 and bug 1699607,
currently there's no way for quick suggest to accurately specify the last index
as its suggested index.

Differential Revision: https://phabricator.services.mozilla.com/D109571
2021-03-25 20:32:52 +00:00
Florian Quèze
79b045fc1f Bug 1596165 - add back timers for tests that permafail without the waitForCondition initial timer, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D109646
2021-03-25 18:30:07 +00:00
Doug Thayer
ec23c3ca31 Bug 1693133 - Fix resetProfile.xhtml tests r=Gijs
BrowserTestUtils.promiseAlertDialog and friends account for commonDialog.xhtml,
but not other dialogs which go through gDialogBox. This fixes that by adding a
inWindowDialog option to promiseAlertDialog. I don't like this solution very
much - it requires all of these dialogs to fire the event themselves. An
alternative might be putting this code in some file which these all include,
but given how small the code is that feels like overkill. Alternatives welcome.

Differential Revision: https://phabricator.services.mozilla.com/D109674
2021-03-25 17:28:56 +00:00
Brindusan Cristian
53931c7cda Backed out 2 changesets (bug 1596165) for bc failures in browser_bookmarkProperties_folderSelection.js and browser_doorhanger_submit_telemetry.js. CLOSED TREE
Backed out changeset 4eccbb3d6549 (bug 1596165)
Backed out changeset 7d8fb53c8fcb (bug 1596165)
2021-03-25 00:48:01 +02:00
Florian Quèze
c27883eea9 Bug 1596165 - add back timers for tests that permafail without the waitForCondition initial timer, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D109646
2021-03-24 20:46:14 +00:00
Drew Willcoxon
076a16cc9a Bug 1699211 - Test: Properly take result span into account when updating the urlbar view. r=mak
This adds a test for D108904.

Depends on D108904

Differential Revision: https://phabricator.services.mozilla.com/D109417
2021-03-24 18:00:37 +00:00
Harry Twyford
35161ada24 Bug 1616700 - Part 1 - Use default address bar search mode for new tab search handoff r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108825
2021-03-23 22:56:54 +00:00
Marco Bonardo
779e36c5a0 Bug 1700137 - Add Search Engine is missing in address bar context menu after customization. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D109480
2021-03-23 17:54:31 +00:00
Andrei Oprea
4b3335c6fd Bug 1694472 - Update UrlbarPrefs to use ExperimentFeature r=k88hudson,mak
Differential Revision: https://phabricator.services.mozilla.com/D106269
2021-03-23 10:26:26 +00:00
Marco Bonardo
925df8fc60 Bug 1699407 - Cannot click on the search mode indicator to focus the urlbar. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D109098
2021-03-20 11:17:25 +00:00
Alexandru Michis
ddfba392b6 Backed out 3 changesets (bug 1616700) for causing failures in browser_privatebrowsing_about.js
Backed out changeset 5e1b8f75fef5 (bug 1616700)
Backed out changeset fdf97a561019 (bug 1616700)
Backed out changeset de3717cc63ef (bug 1616700)
2021-03-20 01:23:39 +02:00
Harry Twyford
5808a2b7b2 Bug 1616700 - Part 1 - Use default address bar search mode for new tab search handoff r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D108825
2021-03-19 21:31:12 +00:00
Mark Banner
d1d9f9a603 Bug 1649186 - Remove use of nsISearchService.addEngineWithDetails from remaining mochitests. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D108478
2021-03-19 14:06:07 +00:00
Mark Banner
5e786e8b26 Bug 1687932 - Remove use of nsISearchEngine.addEngineWithDetails from other xpcshell-tests. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D108462
2021-03-19 14:06:06 +00:00
Florian Quèze
e0cbd5a96a Bug 1553097 - browser_autocomplete_a11y_label.js should wait for the next refresh tick before accessing accessible names, r=mak.
Depends on D108012

Differential Revision: https://phabricator.services.mozilla.com/D108013
2021-03-17 17:39:31 +00:00
Drew Willcoxon
ce91914029 Bug 1698534 - Go back to properly doing exact matching for quick suggest, and rewrite flatten logic. r=daleharvey
The matching logic can be simplified since we want exact matches and not prefix
matches. There's no need to confirm that the query string is in a candidate
result's list of keywords because by its nature the process of looking up the
query in the tree confirms that the query is equal to some keyword. If the
lookup finds a result, then necessarily the query matches a keyword.

I changed lookup from recursive to iterative. It might be a little faster and
it's not really harder to understand.

I also moved the full keyword computation out of the keyword tree and into
UrlbarQuickSuggest. It was a little hacky how KeywordTree accessed
`UrlbarQuickSuggest._results` during its lookup, and it forced the test to have
to set up `UrlbarQuickSuggest._results`. And big picture, it's not the keyword
tree's job to compute the full keyword/suggestion.

While working on all of this, `test_flatten` started failing when it calls
`basicChecks` because the flattened tree wasn't correct, so I rewrote and
simplified the flatten routine. It's no longer necessary for `RESULT_KEY` to be
in a map all by itself. Instead, it's treated like an ordinary char in the
context of flattening, so now it's more like a sentinel or suffix than a key.

Finally, I removed the "test1" and "test2" data in the test because I added them
when I thought they tested bug 1697678, but they don't actually. I don't think
they're testing anything useful.

Depends on D108683

Differential Revision: https://phabricator.services.mozilla.com/D108564
2021-03-16 23:46:43 +00:00
Drew Willcoxon
76d92065bb Bug 1698917 - Simple fix for bug 1698534: Go back to properly doing exact matching for quick suggest. r=nanj
Differential Revision: https://phabricator.services.mozilla.com/D108683
2021-03-16 20:33:22 +00:00
Marco Bonardo
6402cfaba1 Bug 1691474 - Allow to add search engines from the shortcut buttons in the Address Bar. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D108183
2021-03-15 17:18:57 +00:00
Mark Striemer
8b9967d92d Bug 1694817 - Fix tests that fail with browser.proton.toolbar.enabled r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D107294
2021-03-12 20:01:04 +00:00
Drew Willcoxon
275912b943 Bug 1697678 - Choose quick suggest suggestions only from matching results. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107973
2021-03-11 21:00:15 +00:00
Noemi Erli
62639374c4 Backed out changeset 8dd76087ff2b (bug 1694817) for causing failures in browser_UITour.js 2021-03-11 21:56:07 +02:00
Mark Striemer
570cccef25 Bug 1694817 - Fix tests that fail with browser.proton.toolbar.enabled r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D107294
2021-03-11 15:09:21 +00:00
Mark Banner
4622182465 Bug 1697523 - Fix running browser_autocomplete_enter_race.js in verify mode. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D108006
2021-03-11 14:49:41 +00:00
Daisuke Akatsuka
a9fdf157e4 Bug 1693320: Avoid autofilling if uri fragment does not match with case-sensitive. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D106393
2021-03-11 00:20:39 +00:00
Mark Banner
c37e909d81 Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 14:21:12 +00:00
Bogdan Tara
621d71189b Backed out 2 changesets (bug 369739, bug 1696027) for browser_searchChangedEngine.js and test_webextensions_upgrade.js failures CLOSED TREE
Backed out changeset 2705f924b635 (bug 369739)
Backed out changeset 6e5ccf3eeaa6 (bug 1696027)
2021-03-10 15:36:28 +02:00
Mark Banner
9df3e3dc07 Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 12:34:43 +00:00
Bogdan Tara
ebf7802e4a Backed out 2 changesets (bug 369739, bug 1696027) for test_TelemetryEnvironment.js xpcshell failures CLOSED TREE
Backed out changeset 9ea26aff5a9b (bug 369739)
Backed out changeset 395e7278e415 (bug 1696027)
2021-03-10 10:27:02 +02:00
Mark Banner
62144490ad Bug 1696027 - Remove use of nsISearchEngine.addEngineWithDetails from mochitests. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D107624
2021-03-10 07:40:22 +00:00
Daisuke Akatsuka
51225b40ac Bug 1327589: Remove line chars if the pasted value looks URI. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D107322
2021-03-10 07:19:58 +00:00
Marco Bonardo
2b99ea2e97 Bug 1696752 - Allow to Add Web Engines from the urlbar contextual menu. r=harry,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107370
2021-03-09 13:44:03 +00:00
Dale Harvey
8d3a00eaf8 Bug 1697003 - Update strings for Firefox Suggest experiment r=adw
Differential Revision: https://phabricator.services.mozilla.com/D107525
2021-03-09 12:59:03 +00:00
Csoregi Natalia
fa029583ab Backed out changeset 0a8323260fa7 (bug 1696752) for build bustages on page_action_menu_add_search_engine_2.xml CLOSED TREE 2021-03-09 14:13:06 +02:00
Marco Bonardo
46c22b83c6 Bug 1696752 - Allow to Add Web Engines from the urlbar contextual menu. r=harry,desktop-theme-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D107370
2021-03-09 11:19:40 +00:00
Drew Willcoxon
5eed071fe5 Bug 1696267 - Dedupe urlbar search suggestions and search history accounting for leading and trailing spaces. r=mak
This also fixes a potential problem when deduping SERPs against form history:
We're creating SERP URLs based on the lowercased version of SERP terms instead
of the terms as is. That means we won't detect example.com/?q=foo and
example.com/?q=FOO as being dupes, but I think we should.

I updated the test to check for leading/trailing spaces as well as case.

Differential Revision: https://phabricator.services.mozilla.com/D107164
2021-03-04 20:46:57 +00:00
Mark Banner
04281bb9b8 Bug 1575649 - When removing a default engine, calculate and notify the new default engine straight away. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D105031
2021-03-03 22:23:20 +00:00
Drew Willcoxon
1fe22b7cde Bug 1696084 - Open help links in a new tab. r=harry
Depends on D107015

Differential Revision: https://phabricator.services.mozilla.com/D107021
2021-03-03 18:52:48 +00:00
Drew Willcoxon
848eac0224 Bug 1696061 - Always show the help button in quick suggest results and remove onboarding code. r=nanj
Depends on D107012

Differential Revision: https://phabricator.services.mozilla.com/D107015
2021-03-03 05:33:01 +00:00
Drew Willcoxon
14eefa1933 Bug 1693671 - Update the Quick Suggest help URL. r=daleharvey,Gijs
We're going with a SUMO page after all and not a blog URL.

Depends on D106940

Differential Revision: https://phabricator.services.mozilla.com/D107012
2021-03-03 00:48:01 +00:00
Dão Gottwald
f33af33f30 Bug 1695747 - Remove sponsored top sites from address bar results. r=mikedeboer
Differential Revision: https://phabricator.services.mozilla.com/D106866
2021-03-02 13:09:34 +00:00
Dale Harvey
4de60850ce Bug 1692536 - Highlight where users input matches QuickSuggest result. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D106833
2021-03-02 09:03:00 +00:00
Drew Willcoxon
6ee5ab0662 Bug 1692615 - Make sure Quick Suggest results are accessible. r=harry,Jamie
This fixes the two a11y problems with quick suggest results:

* When their help button is present, they aren't recognized as a listbox
  option. That has a couple of consequences: They aren't read as an "<index> of
  <size>" option, and they're read as an autocompleted URL instead of their
  title.
* Their help button is read as its URL instead of its label. (The button has a
  URL that's loaded when you click it.)

Fixing the second problem is easy, just give the help button an ID.

The first problem is trickier. It's due to the fact that when the help button is
present in the actual row, the "logical" row -- the part that's selectable and
looks like the main part of the row -- is not the row itself but rather one of
its children. So the rows container with `role=listbox` doesn't have the
selectable part as a direct child. To fix that, I added `role=option` to the
selectable part and `role=presentation` to the row itself.

Aside from these fixes, another possibility is to include the row's help button
as an option too, instead of as a button. I chose not to do that because it's
really a button and not a row/result, and also we have precedent with tip
results, which have similar buttons that we treat like this.

Note that the help button is *not* read on hover, only when keyboard selected.
That's a known bug we encountered in tips or interventions, but I can't find the
bug.

Depends on D106559

Differential Revision: https://phabricator.services.mozilla.com/D106712
2021-03-02 02:21:05 +00:00
Dale Harvey
c87dcc5e4c Bug 1692551 - Add the full matched keyword to QuickSuggest result r=adw
Differential Revision: https://phabricator.services.mozilla.com/D106615
2021-03-01 21:51:47 +00:00
Drew Willcoxon
be1902fff1 Bug 1692527 - Show "Firefox Suggests" instead of "Sponsored" for non-sponsored quick suggest results. r=daleharvey
Depends on D106490

Differential Revision: https://phabricator.services.mozilla.com/D106559
2021-02-26 18:40:33 +00:00
Nan Jiang
47fca6093a Bug 1689365 - Add custom impression and click for QuickSuggest r=adw,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D106490
2021-02-25 22:17:12 +00:00
Michelle Goossens
32a54b2882 Bug 1692672 - Re-label "Paste & Go" to "Paste and Go" r=emalysz,flod
Differential Revision: https://phabricator.services.mozilla.com/D106499
2021-02-25 17:28:33 +00:00
Dale Harvey
cfe3d13030 Bug 1694694 - Ensure QuickSuggest searches are case insensitive r=adw
Differential Revision: https://phabricator.services.mozilla.com/D106326
2021-02-25 14:57:35 +00:00
Drew Willcoxon
5c28daf615 Bug 1693126 - Add telemetry for when users disable Quick Suggest. r=harry,nanj
This adds event telemetry that's recorded when the
`browser.urlbar.suggest.quicksuggest` pref is toggled. This pref corresponds to
the checkbox in about:preferences#search labeled "Show suggested and sponsored
results in the address bar".

I used `contextservices.quicksuggest` as the event telemetry category name to be
similar to the `contextual.services.quicksuggest.*` scalars. Event names are
limited to 30 chars, so it couldn't be exactly the same.

This is based on my earlier revision for scalar telemetry in D106173.

Depends on D106173

Differential Revision: https://phabricator.services.mozilla.com/D106248
2021-02-25 06:21:32 +00:00
Drew Willcoxon
da79f59395 Bug 1693927 - Record keyed scalar telemetry for impressions and clicks on Quick Suggest results. r=harry,nanj
This adds three new keyed scalars:

* `contextual.services.quicksuggest.impression`: Incremented when a Quick
  Suggest result is shown in an address bar engagement where the user picks any
  result.
* `contextual.services.quicksuggest.click`: Incremented when the user picks a
  Quick Suggest result (not including the help button).
* `contextual.services.quicksuggest.help``: Incremented when the user picks the
  onboarding help button in a Quick Suggest result.

The changes to telemetry.rst and Scalars.yaml have more details.

I modified `TelemetryEvent.typeFromElement()` to return `"help"` for clicks on
the help button so that the quick suggest provider can tell whether the main
part of the result was picked or the help button. I left `"tiphelp"` for tip
help buttons in case anything depends on that.

Depends on D106060

Differential Revision: https://phabricator.services.mozilla.com/D106173
2021-02-25 06:21:30 +00:00
Csoregi Natalia
bfcf41eb69 Backed out 2 changesets (bug 1693927, bug 1693126) as requested. CLOSED TREE
Backed out changeset f49147a4544b (bug 1693126)
Backed out changeset 8bb5bc9c97b2 (bug 1693927)
2021-02-25 05:08:26 +02:00