Closed Bug 1400555 Opened 8 years ago Closed 5 years ago

browser.tabs.update({url: “about:home”}); does not seem to work on FF Nightly Android 2017-09-11

Categories

(WebExtensions :: Android, defect, P3)

57 Branch
All
Android
defect

Tracking

(firefox57 fix-optional)

RESOLVED INVALID
Tracking Status
firefox57 --- fix-optional

People

(Reporter: mark.paxman99, Unassigned)

References

Details

(Whiteboard: [tabs])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4 Steps to reproduce: Wrote a WebExtension including the line:- browser.tabs.update({url: “about:home”}); Actual results: it did not do anything on FF Nightly Android 2017-09-16. It worked as expected on FF Nightly Desktop 2017-09-11 for MacOS in add-on debugging mode. I tried browser.tabs.update({url: “about:blank”}); and browser.tabs.update({url: “https://developer.mozilla.org”}); They both worked as expected on FF Nightly Android 2017-09-16. Expected results: It should have opened my FF Android home page (list of bookmarks).
Component: Plugins → WebExtensions: Android
OS: Unspecified → Android
Product: Firefox for Android → Toolkit
Hardware: Unspecified → All
It seems that "about:home" is blocked by `checkLoadURL` called from the following code: - http://searchfox.org/mozilla-central/rev/05c4c3bc0cfb9b0fc66bdfc8c47cac674e45f151/mobile/android/components/extensions/ext-tabs.js#304-306 The same `checkLoadURL` is also called from the Desktop implementation of the tabs API: - http://searchfox.org/mozilla-central/rev/05c4c3bc0cfb9b0fc66bdfc8c47cac674e45f151/browser/components/extensions/ext-tabs.js#437-439 It doesn't seem that we have changed this code recently, and so it doesn't seem to be a recent regression. I've tested the usage of the "about:home" url in a tabs.update API call and it seems that it is allowed on Firefox Desktop but it is denied on Firefox for Android, there is no special checks for the "about:home" page happening in the `checkLoadURL`, and so it is likely that the behavior of `checkLoadURL` is different on Android because the url itself is considered a privileged one on Firefox for Android (but not on Firefox Desktop), similarly to the "about:addons" page which is explicitly tested to be rejected by tabs.update (but in this case it is rejected on both Firefox for Android and Firefox Desktop): - on Firefox for Android: http://searchfox.org/mozilla-central/rev/05c4c3bc0cfb9b0fc66bdfc8c47cac674e45f151/mobile/android/components/extensions/test/mochitest/test_ext_tabs_update_url.html#99-102 - on Firefox Desktop: http://searchfox.org/mozilla-central/rev/05c4c3bc0cfb9b0fc66bdfc8c47cac674e45f151/browser/components/extensions/test/browser/browser_ext_tabs_update_url.js#93-96 I tried locally to apply a change that doesn't call `checkLoadURL` if the url is "about:home" (mostly to double-check that `checkLoadURL` was the only actual blocker) and it has been enough to make `tabs.update` able to load the "about:home" page, but before deciding how to allow this, it would be better to check which are the reasons that are affecting the behavior of `checkLoadURL` on the "about:home" url on Firefox for Android.
Priority: -- → P3
Whiteboard: [tabs]
Blocks: 1418022
Product: Toolkit → WebExtensions

Firefox for Android doesn't have about:home anymore.

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.