Commit Graph

19 Commits

Author SHA1 Message Date
Harry Twyford
c1f33cff59 Bug 1606924 - Remove unused urlbar WebExtension APIs. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D69820
2020-04-07 04:43:47 +00:00
Dão Gottwald
ef321fc334 Bug 1539838 - Move SetPageProxyState into UrlbarInput. r=harry
Differential Revision: https://phabricator.services.mozilla.com/D66288
2020-03-12 18:15:58 +00:00
Drew Willcoxon
b3b84fdecf Bug 1608601 - Add browser.experiments.urlbar.clearInput() experiment API. r=harry
We need to also set the pageproxystate to invalid so that we show the magnifying glass icon in the input instead of the lock and shield.

This is used in the extension's background script here: https://github.com/0c0w3/urlbar-tips-experiment/pull/8/files#diff-961641dd6af66f5e3313307cf4eb8f1dR339  (Bug 1608613 tracks that PR)

Differential Revision: https://phabricator.services.mozilla.com/D59591
2020-01-12 02:49:06 +00:00
Drew Willcoxon
b703569d86 Bug 1600860 - Add browser.experiments.urlbar.installBrowserUpdateAndRestart. r=mak,mixedpuppy
Users can opt out of automatic updates. In that case, when an update is available, we need to let the user download and install it and restart the browser. This case isn't covered in the interventions spec, but it's consistent with the intention to give the user a one-click way to continue on their upgrade path, so I think we should handle it.

This patch adds a `browser.experiments.urlbar.installBrowserUpdateAndRestart` function. At first I made it only install the update, and then the extension called our existing `restartBrowser` function once that finished. But it didn't work because `restartBrowser` must be called from a user-input handler, and apparently by awaiting the install function, any code running after the `await` isn't considered to be in the user-input handler.

Differential Revision: https://phabricator.services.mozilla.com/D55608
2019-12-04 16:58:19 +00:00
Drew Willcoxon
28d9e27732 Bug 1596258 - Add browser.experiments.urlbar.checkForBrowserUpdate and getBrowserUpdateStatus. r=mak,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D54397
2019-12-03 22:10:20 +00:00
Harry Twyford
1838a61241 Bug 1594786 - Part 2 - WebExt API: Add browser.experiments.app.openClearHistoryDialog call. r=mixedpuppy,adw,rpl
Differential Revision: https://phabricator.services.mozilla.com/D52842
2019-11-22 13:14:15 +00:00
Razvan Maries
dc988b804a Backed out 2 changesets (bug 1594786) for perma fails on test_ext_all_apis.html. CLOSED TREE
Backed out changeset 6f9f1ab36756 (bug 1594786)
Backed out changeset da5d5f59a7da (bug 1594786)
2019-11-22 15:09:00 +02:00
Harry Twyford
395db517ee Bug 1594786 - Part 2 - WebExt API: Add browser.experiments.app.openClearHistoryDialog call. r=mixedpuppy,adw,rpl
Differential Revision: https://phabricator.services.mozilla.com/D52842
2019-11-21 21:37:32 +00:00
Drew Willcoxon
5ef1ecd793 Bug 1596980 - Copy browser.experiments.urlbar.engagementTelemetry from top sites experiment to our mozilla-central experiment files r=mak,mixedpuppy
Original code by Marco Bonardo <mbonardo@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D53311
2019-11-20 22:51:19 +00:00
Ciure Andrei
d1fd013314 Backed out changeset 262d5c44d7a7 (bug 1596980) for causing browser_ext_urlbar_engagementTelemetry.js to permafail CLOSED TREE 2019-11-20 00:08:59 +02:00
Drew Willcoxon
7d8cf6a93b Bug 1596980 - Copy browser.experiments.urlbar.engagementTelemetry from top sites experiment to our mozilla-central experiment files r=mak,mixedpuppy
Original code by Marco Bonardo <mbonardo@mozilla.com>

Differential Revision: https://phabricator.services.mozilla.com/D53311
2019-11-19 14:53:37 +00:00
Harry Twyford
13144d7074 Bug 1579937 - WebExt API: Add browser.experiments.urlbar.resetBrowser call. r=adw,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D52638
2019-11-19 15:42:14 +00:00
Marco Bonardo
8e8efb77b3 Bug 1579935 - WebExt API: Add browser.experiments.urlbar.restartBrowser. r=adw,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D53051
2019-11-15 09:17:30 +00:00
Drew Willcoxon
c7c5aa83a0 Bug 1595328 - Add browser.experiments.urlbar.lastBrowserUpdateDate webextension experiment API. r=mak,mixedpuppy CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D52948
2019-11-14 20:00:46 +00:00
Ciure Andrei
2e2fa952e2 Backed out changeset 289a3851e8c7 (bug 1595328) for causing test_ext_tabs_query.html to permafail CLOSED TREE 2019-11-15 03:27:50 +02:00
Drew Willcoxon
79b7446282 Bug 1595328 - Add browser.experiments.urlbar.lastBrowserUpdateDate webextension experiment API. r=mak,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D52948
2019-11-14 20:00:46 +00:00
Marco Bonardo
4d05f462d9 Bug 1579936 - WebExt API: Add browser.experiments.urlbar.isBrowserUpdateReadyToInstall. r=adw,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D52884
2019-11-14 10:20:40 +00:00
Drew Willcoxon
bf85189470 Bug 1595678 - browser.experiments.urlbar.isBrowserShowingNotification should not treat app menu badges as notifications. r=mak
This also updates each test task to make sure the function returns false after each notification is dismissed.

Differential Revision: https://phabricator.services.mozilla.com/D52915
2019-11-13 22:50:50 +00:00
Drew Willcoxon
eb843af9da Bug 1568595 - [Nudges] Implement an experiment API to check whether a notification is being displayed in Firefox r=mak,mixedpuppy
This sets up a `browser.experiments.urlbar` WebExtension Experiment API and adds a function called `isBrowserShowingNotification`. To recap, for the nudges experiment, we want to open the urlbar view automatically in some cases to show a nudge, but only if the browser isn't already showing a notification.

There are a few things to point out about this patch.

What counts as a notification is a little fuzzy. I chose: the tracking protection doorhanger, site identity doorhanger, app menu notifications, notification box (info bar), page action panels, and toolbar button panels. The last two aren't really notifications, but they're panels similar to doorhanger notifications. I also count the urlbar view as a notification since we don't want to show a nudge if the urlbar view is already open. I didn't bother with tab-modal dialogs since none of the pages we want to show nudges on will have them. I didn't bother with app-modal dialogs since the user can't interact with the browser until they're dismissed.

I chose `browser.experiments.urlbar` as the namespace, which we previously used in the top-sites experiment. There was also discussion of `browser.experiments.app` (bug 1579933), but I think we should keep all our urlbar experiment-related APIs in a urlbar namespace even when they aren't actually related to the urlbar. It's not a big deal though.

Shane recommends that we land tests for our experiment APIs in mozilla-central even though they won't ship in mozilla-central, at least for APIs that will be used in more than one version of Firefox. I think that's also a good idea for APIs we reuse in multiple experiments. It may not be necessary in this case since I'm not sure how broadly useful this notification API is, so I'm open to removing it and keeping it only in the experiment's GitHub repo. But I found that this was actually a nice way to develop and test this patch. Also, if we keep our experiment APIs in mozilla-central this way, we may not need a separate GitHub repo for them, or at most it'll just be a copy of this browser/components/urlbar/tests/ext directory.

As mentioned, I made a new ext tests directory. I think we should keep these files separate from the normal tests.

Differential Revision: https://phabricator.services.mozilla.com/D52312
2019-11-12 02:55:15 +00:00