Commit graph

58 commits

Author SHA1 Message Date
Harry Twyford
8c2a61dafd Bug 1677126 - Part 4 - Port remote tab tests and update them to expect result flex. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D114895
2021-06-02 22:43:29 +00:00
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
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
harry
9e16e8ed83 Bug 1679890 - Change UrlbarProviderExtension.notificationTimeout into a pref. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D98253
2020-12-01 05:35:45 +00:00
Drew Willcoxon
6d6402fb4e Bug 1658964 - Convert local restriction chars to search mode and make other improvements to search mode. r=harry
Summary of major changes:

* Bookmarks, history, and tabs restriction chars now enter search mode. I added
  a method to UrlbarProviderHeuristicFallback to return a result with a keyword
  when one of these is used.
* This fixes other bugs like recognizing aliases that are entered at the
  beginning of non-empty search strings, and not quasi-re-entering search mode
  when search mode is already entered and you type another alias.
* The heuristic now determines whether we enter search mode, similar to how it
  also determines whether we autofill. When the heuristic has a keyword but no
  keyword offer, and the keyword is one of the recognized search mode keywords,
  then we enter search mode, cancel the current query, and start a new query
  with the remainder of the search string after the keyword.
* I slightly changed how we detect an alias, but only when update2 is
  enabled. Now, an alias must be followed by a space; otherwise, the alias is
  not recognized and instead just remains part of the seach string. Because if
  we don't do that, then you end up in a strange situation after typing an alias
  but before pressing space: The heuristic says "Search with <engine with the
  alias>", but we haven't entered search mode yet because you haven't typed a
  space yet. This is true for both @aliaes and non-@aliases.
* A consequence of the previous point is that we can still autofill @aliases
  with a trailing space, which IMO is important. Then, once the user types any
  char (space or not), we immediately enter search mode with the query being
  whatever char they typed. This is less important after bug 1658605 landed, but
  it's still good to have.
* Previously, `UrlbarView.onQueryResults` called UrlbarInput in order to
  autofill after the first result is received. This is circuitous becaue the
  input already has an `onFirstResult` method, which I now use to enter search
  mode when appropriate. So I moved the autofill call from UrlbarView to
  `UrlbarInput.onFirstResult`.
* As I mentioned, I improved some test framework and simplified some related
  product (non-test) code. For example:
    * I removed `UrlbarUtils.KEYWORD_OFFER.NONE` in favor of just leaving
      `keywordOffer` as `undefined`.
    * `tailOffsetIndex` can now be `undefined` if it's not relevant.
    * I removed empty-string `icon` properties from payloads in favor of
      `undefined`.
    * In tests, I ignore `undefined` but present properties in payloads so they
      don't count when comparing payloads with `deepEqual`.
    * We weren't previously comparing `result.source` and `result.type` in
      xpcshell tests, and that's important IMO, so I added checks for those and
      updated tests.
    * `isSearchHistory` is redundant, so I removed it. For form history, we
      should be checking `result.source == HISTORY` and `result.type == SEARCH`.
* A bunch of tests needed to be updated for this new behavior.

Differential Revision: https://phabricator.services.mozilla.com/D87944
2020-09-02 00:52:12 +00:00
Mark Banner
552793d2cc Bug 1619926 - Remove remnants of Search geo-location handling now it is handled by Region.jsm. r=daleharvey
Depends on D88021

Differential Revision: https://phabricator.services.mozilla.com/D88022
2020-09-01 18:08:46 +00:00
Butkovits Atila
7b340f9684 Backed out 15 changesets (bug 1612824, bug 1661234, bug 1619926, bug 1612380, bug 1559530, bug 1642990) for Xpc failures. CLOSED TREE
Backed out changeset 426d017d7e46 (bug 1642990)
Backed out changeset 84ab4021d403 (bug 1559530)
Backed out changeset 82a8305543e5 (bug 1559530)
Backed out changeset 38832c1185b8 (bug 1559530)
Backed out changeset f16918c10a6b (bug 1661234)
Backed out changeset 3a13258fbd51 (bug 1661234)
Backed out changeset abf8d8b24845 (bug 1612824)
Backed out changeset 7dfeb065a385 (bug 1619926)
Backed out changeset bc9d3e210fe7 (bug 1619926)
Backed out changeset 786164c461ae (bug 1619926)
Backed out changeset d89793e9d17d (bug 1619926)
Backed out changeset d665885bc912 (bug 1619926)
Backed out changeset 9260b6620943 (bug 1619926)
Backed out changeset af69a4896f2f (bug 1619926)
Backed out changeset b9cd6b7047b9 (bug 1612380)
2020-09-01 21:03:23 +03:00
Mark Banner
074a2c9ecb Bug 1619926 - Remove remnants of Search geo-location handling now it is handled by Region.jsm. r=daleharvey
Depends on D88021

Differential Revision: https://phabricator.services.mozilla.com/D88022
2020-08-31 16:34:25 +00:00
Harry Twyford
12102e198f Bug 1645521 - Part 2 - Allow for multiple heuristic providers and enable ProviderHeuristicFallback. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D80293
2020-07-12 17:35:01 +00:00
Csoregi Natalia
b74c685d0f Backed out 6 changesets (bug 1650099, bug 1647881, bug 1645521, bug 1645324) for causing Bug 1652024.
Backed out changeset f66c5cce9088 (bug 1650099)
Backed out changeset bf67c2159244 (bug 1645324)
Backed out changeset 76d81e1e728b (bug 1645521)
Backed out changeset ab3766fa81f9 (bug 1645521)
Backed out changeset ff56bb6cbfb7 (bug 1645521)
Backed out changeset aceb6f9acf3b (bug 1647881)
2020-07-12 17:58:28 +03:00
Harry Twyford
7e31642215 Bug 1645521 - Part 2 - Allow for multiple heuristic providers and enable ProviderHeuristicFallback. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D80293
2020-07-09 05:02:49 +00:00
Cosmin Sabou
71bfce5442 Backed out 5 changesets (bug 1650099, bug 1645521, bug 1645324) as requested by harry for causing bug 1652024.
Backed out changeset 93abbd32c314 (bug 1650099)
Backed out changeset 366f7bfe267c (bug 1645324)
Backed out changeset b92a18e970ee (bug 1645521)
Backed out changeset d57d3a47b1ad (bug 1645521)
Backed out changeset 41e4a6353913 (bug 1645521)
2020-07-11 02:03:18 +03:00
Harry Twyford
734973aa0a Bug 1645521 - Part 2 - Allow for multiple heuristic providers and enable ProviderHeuristicFallback. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D80293
2020-07-09 05:02:49 +00:00
Dorel Luca
584ee0d8de Backed out 5 changesets (bug 1647881, bug 1645521, bug 1645324) for BC failures in urlbar/tests/browser/browser_autocomplete_a11y_label.js. CLOSED TREE
Backed out changeset 65f908569875 (bug 1645324)
Backed out changeset 3080a3cacd0a (bug 1645521)
Backed out changeset d32236f070bf (bug 1645521)
Backed out changeset 579362aab769 (bug 1645521)
Backed out changeset 2b306b83c0d1 (bug 1647881)
2020-07-09 07:57:42 +03:00
Harry Twyford
8d274264c0 Bug 1645521 - Part 2 - Allow for multiple heuristic providers and enable ProviderHeuristicFallback. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D80293
2020-07-09 02:12:33 +00:00
Drew Willcoxon
7024c06712 Bug 1640045 - Replace PlacesSearchAutocompleteProvider with UrlbarSearchUtils, remove its parseSubmissionURL function, and init the search service on the first query. r=mak
* Replace PlacesSearchAutocompleteProvider with UrlbarSearchUtils.
  * Move the module from toolkit to browser. The only consumers of
    PlacesSearchAutocompleteProvider are urlbar and UnifiedComplete.
  * I'd like to add functions to UrlbarUtils instead, but
    PlacesSearchAutocompleteProvider adds itself as an observer for search
    engine changes, and it keeps some state so that alias lookups are O(1). It
    has an init function to set that up. That's not quite as easy to do if I
    just added some functions to UrlbarUtils, and I think that O(1) lookups of
    aliases are worth keeping (vs. O(number of installed engines)), so I kept a
    separate module, now called UrlbarSearchUtils.
* Init the search service (via UrlbarSearchUtils) from
  UrlbarProvidersManager.startQuery so that every module involved in querying
  doesn't need to do it.
* Remove PlacesSearchAutocompleteProvider.currentEngine. Previous consumers can
  simply use Services.search directly now that the service is initialized early
  (see previous point).
* Remove PlacesSearchAutocompleteProvider.parseSubmissionURL. Here again
  consumers can use Services.search directly.

Differential Revision: https://phabricator.services.mozilla.com/D79244
2020-06-16 01:08:38 +00:00
Drew Willcoxon
bde963d702 Bug 1398416 - Part 3: Implement form history results. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75685
2020-05-21 19:31:27 +00:00
Harry Twyford
3b07e6dc71 Bug 1637060 - Don't show tail suggestions if there are other non-heuristic results. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D75583
2020-05-20 18:18:19 +00:00
Harry Twyford
2a055a380d Bug 1626891 - Style tail suggestions differently. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D74740
2020-05-19 13:57:54 +00:00
Harry Twyford
6abd224a1a Bug 1626897 - Part 4 - Add tail suggestion tests. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D74120
2020-05-12 17:01:19 +00:00
Harry Twyford
2a06a6f3c9 Bug 1626946 - Remove search suggestions that dupe a search history result. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D71094
2020-04-22 17:41:00 +00:00
Dão Gottwald
579bafbb86 Bug 1627988 - Remove the browser.urlbar.update1.view.stripHttps pref. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D70208

--HG--
extra : moz-landing-system : lando
2020-04-09 13:54:19 +00:00
Drew Willcoxon
5739954280 Bug 1616752 - Part 2: Add payload schemas for each result type and validate payloads against them. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D64300

--HG--
extra : moz-landing-system : lando
2020-03-26 15:27:12 +00:00
Mark Banner
e3c114a575 Bug 1612416 - Fix failing tests for when the Search Service modern configuration is turned on. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D61485

--HG--
extra : moz-landing-system : lando
2020-02-12 17:11:23 +00:00
Drew Willcoxon
416ccb5261 Bug 1608597 - Quantumbar: Replace restricting providers with a priority system. r=mak
Replace `isRestricting` with `getPriority` -- i.e., replace the binary restricting system with a general priority system. Instead of choosing restricting providers, the providers manager chooses the highest-priority providers.

Differential Revision: https://phabricator.services.mozilla.com/D60093

--HG--
extra : moz-landing-system : lando
2020-01-17 20:50:45 +00:00
Cosmin Sabou
4b24015c8a Backed out changeset c516b5d716f1 (bug 1608597) for browser chrome failures on browser_search_tips. 2020-01-17 20:10:21 +02:00
Drew Willcoxon
e693e42a59 Bug 1608597 - Quantumbar: Replace restricting providers with a priority system. r=mak
Replace `isRestricting` with `getPriority` -- i.e., replace the binary restricting system with a general priority system. Instead of choosing restricting providers, the providers manager chooses the highest-priority providers.

Differential Revision: https://phabricator.services.mozilla.com/D60093

--HG--
extra : moz-landing-system : lando
2020-01-17 16:11:31 +00:00
Luca Greco
cd519c4f3d Bug 1606389 - Fix race in test_ext_urlbar test_engagementTelemetry. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D58617

--HG--
extra : moz-landing-system : lando
2020-01-03 17:46:53 +00:00
Harry Twyford
189cfa08b7 Bug 1605958 - Disable openViewOnFocus WebExt API. r=mikedeboer
This API is no longer needed, seeing as the Top Sites experiment is over. Dao suggested in bug 1605958 comment 1 that it be removed.

Differential Revision: https://phabricator.services.mozilla.com/D58375

--HG--
extra : moz-landing-system : lando
2019-12-30 16:30:35 +00:00
Dão Gottwald
731512a1ab Bug 1603778 - Enable openViewOnFocus in Nightly. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D57466

--HG--
extra : moz-landing-system : lando
2019-12-24 16:10:41 +00:00
Marco Bonardo
4b9e5194b2 Bug 1599839 - Merge sources and acceptableSources in UrlbarQueryContext. r=adw,mixedpuppy
Rename acceptableSources to just sources, merge it with the existing sources property.

Differential Revision: https://phabricator.services.mozilla.com/D55082

--HG--
extra : moz-landing-system : lando
2019-12-02 17:20:39 +00:00
Shane Caraveo
43733c66c4 Bug 1578513 make disable/enable during safe mode update extension settings r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D44595

--HG--
extra : moz-landing-system : lando
2019-11-27 20:00:08 +00:00
Harry Twyford
9b61c484ab Bug 1597698 - Move all megabar prefs under a urlbar.update1 branch. r=mak,dao
Differential Revision: https://phabricator.services.mozilla.com/D54146

--HG--
extra : moz-landing-system : lando
2019-11-26 17:15:31 +00:00
Drew Willcoxon
63a154b6a0 Bug 1597610 - Add browser.urlbar.onEngagement WebExtensions API. r=mak,mixedpuppy
Adds a `browser.urlbar.onEngagement` event. Listeners are passed the current engagement state: start, engagement, abandonment, or discard. The extension could use this to record its own parallel telemetry (scalars, event telemetry, etc.) per engagement.

Differential Revision: https://phabricator.services.mozilla.com/D53897

--HG--
extra : moz-landing-system : lando
2019-11-25 23:52:56 +00:00
Drew Willcoxon
2687f37446 Bug 1594622 - Quantumbar: Remove the context.preselected property and rely on result.heuristic instead r=mak
Please see bug 1594622 for a description.

Differential Revision: https://phabricator.services.mozilla.com/D52120

--HG--
extra : moz-landing-system : lando
2019-11-08 18:50:00 +00:00
Dão Gottwald
786dcf2f6a Bug 1589923 - Strip https:// instead of http:// from URLs in the results view. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D49842

--HG--
extra : moz-landing-system : lando
2019-10-22 07:22:55 +00:00
Mihai Alexandru Michis
d874b02b52 Backed out 2 changesets (bug 1588469, bug 1588464) for causing bc failures in browser_test_focus_urlbar.js CLOSED TREE
Backed out changeset c5bff62e1640 (bug 1588464)
Backed out changeset b85a79175973 (bug 1588469)
2019-10-17 02:09:57 +03:00
Marco Bonardo
eddf83bc7a Bug 1588469 - Show Search in a Private Window even if search suggestions in address bar are disabled. r=Standard8
Split the SEARCH source into SEARCH_NETWORK or SEARCH_LOCAL to distinguish
search results coming from a remote source, from those generated locally.
browser.urlbar.suggest.searches will only affect SEARCH_NETWORK results.

Differential Revision: https://phabricator.services.mozilla.com/D49172

--HG--
extra : moz-landing-system : lando
2019-10-16 22:07:14 +00:00
Mark Banner
0f977493e1 Bug 1576160 - Turn on the display of default private search engine feature for nightly/early beta users. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D47223

--HG--
extra : moz-landing-system : lando
2019-10-11 07:22:23 +00:00
Marco Bonardo
36787109b0 Bug 1579923 - WebExt API: Add suggestedIndex property to Result type. r=adw,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D46941

--HG--
extra : moz-landing-system : lando
2019-09-30 17:14:20 +00:00
Drew Willcoxon
d7663129bb Bug 1578439 - Quantumbar WebExt API: Add "tip" to ResultType enum and UrlbarProviderExtension.RESULT_TYPES. r=harry,mixedpuppy
Add "tip" to the ResultType enum and UrlbarProviderExtension.RESULT_TYPES, corresponding to the new TIP type. Update the existing test.

Differential Revision: https://phabricator.services.mozilla.com/D46248

--HG--
extra : moz-landing-system : lando
2019-09-19 17:02:39 +00:00
mandy cheang
48f276929d Bug 1566489 - Avoid reading extension-setting.json on start-up, read it lazily. r=aswan,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D40860

--HG--
extra : moz-landing-system : lando
2019-08-08 16:15:17 +00:00
Marco Bonardo
b34a0c82ce Bug 1570434 - Add an API to toggle engagement event telemetry. r=adw,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D40194

--HG--
extra : moz-landing-system : lando
2019-08-01 16:37:17 +00:00
Drew Willcoxon
7d609ae764 Bug 1569812 - Quantumbar: Allow extensions to specify search engines by name, URL, or alias. r=mak
`UrlbarResult` objects for search results have a `payload.engine` property, the name of the engine, but extensions won't always know the name Firefox uses internally or even any name at all. For example, the top sites API returns search results with aliases but not names. We should let extensions specify engine URLs and aliases, and we can use them to look up the engine name.

The UrlbarResult.jsm change is unrelated but fixes a minor annoyance I found while working on the top-sites extension. My background script returns results with `isKeywordOffer: true`, but that causes an error in `UrlbarResult.payloadAndSimpleHighlights` because it converts string values to arrays and then expects non-string values to be arrays. Instead, it should be converting non-array values to arrays.

Differential Revision: https://phabricator.services.mozilla.com/D39800

--HG--
extra : moz-landing-system : lando
2019-07-31 17:00:07 +00:00
Brindusan Cristian
535145f197 Backed out 2 changesets (bug 1556789) on request from aryx for causing Bug 1565836. a=backout
Backed out changeset ca5fdf3a0ddd (bug 1556789)
Backed out changeset 19419ff4e756 (bug 1556789)
2019-07-13 20:52:45 +03:00
Shane Caraveo
36bce0da93 Bug 1556789 - Refactor extension install in searchservice to use promises r=robwu,daleharvey
This provides a set of promises that the searchservice resolves once the search engine has been configured

Differential Revision: https://phabricator.services.mozilla.com/D33660

--HG--
extra : moz-landing-system : lando
2019-07-12 19:33:32 +00:00
Gurzau Raul
7a46596592 Backed out 2 changesets (bug 1556789) for assertion failures in FF functional tests on a CLOSED TREE.
Backed out changeset 2d10e95cf0cd (bug 1556789)
Backed out changeset 0acf6bafda0f (bug 1556789)
2019-07-12 04:45:46 +03:00
Shane Caraveo
b2cb7defd5 Bug 1556789 - Refactor extension install in searchservice to use promises r=robwu,daleharvey
This provides a set of promises that the searchservice resolves once the search engine has been configured

Differential Revision: https://phabricator.services.mozilla.com/D33660

--HG--
extra : moz-landing-system : lando
2019-07-11 18:42:00 +00:00
Noemi Erli
6de41e7f85 Backed out 2 changesets (bug 1556789) for failures in test_engines_on_restart.py
Backed out changeset 5488dbd0fa34 (bug 1556789)
Backed out changeset 021d8cd8ba70 (bug 1556789)
2019-07-11 03:37:26 +03:00
Shane Caraveo
7a246d97fe Bug 1556789 - Refactor extension install in searchservice to use promises r=robwu,daleharvey
This provides a set of promises that the searchservice resolves once the search engine has been configured

Differential Revision: https://phabricator.services.mozilla.com/D33660

--HG--
extra : moz-landing-system : lando
2019-07-10 22:47:02 +00:00