Closed Bug 1296934 Opened 3 years ago Closed 3 years ago

_generated_background_page.html appears in browsing history

Categories

(WebExtensions :: Untriaged, defect)

50 Branch
defect
Not set

Tracking

(firefox50 fixed, firefox51 verified)

VERIFIED FIXED
mozilla51
Tracking Status
firefox50 --- fixed
firefox51 --- verified

People

(Reporter: mozbz, Assigned: kmag)

Details

(Whiteboard: triaged)

Attachments

(1 file)

STR:
0. Create a fresh profile.
1. Install a WebExtension that uses a background script [0][1]
2. Check the History menu/sidebar/Library.

Actual results:
'moz-extension://(Addon GUID)/_generated_background_page.html' is added to the History when the add-on loads.

Expected results:
Background pages shouldn't be added to the user's browsing history.

[0] definition: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/background
[1] example: https://github.com/mdn/webextensions-examples/tree/master/apply-css
Assignee: nobody → kmaglione+bmo
Comment on attachment 8783332 [details]
Bug 1296934: Prevent background pages from showing up in global history.

https://reviewboard.mozilla.org/r/73178/#review70980
Attachment #8783332 - Flags: review?(gkrizsanits) → review+
Whiteboard: triaged
https://hg.mozilla.org/integration/mozilla-inbound/rev/d87ce8e5c2df95cd9b8391ca01c045101632b44d
Bug 1296934: Prevent background pages from showing up in global history. r=gabor
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8783332 [details]
Bug 1296934: Prevent background pages from showing up in global history.

Approval Request Comment
[Feature/regressing bug #]: Bug 1234677
[User impact if declined]: The (somewhat cryptic) URL of an internal, hidden extension page will appear in browsing history, and sometimes even in the new tab page. If users actually load these pages, they're likely to cause serious runtime errors in the extensions they belong to, and unpredictable user-facing behavior. The URLs of background pages did appear in browser history prior to bug 1234677, as well, but at that point they simply appeared as blank pages except when explicitly loaded by the extension runtime.
[Describe test coverage new/current, TreeHerder]: This patch adds tests to make sure that we don't see this behavior.
[Risks and why]: Very low. This patch simply sets a flag on a hidden docshell that prevents it from participating in global history, which has been the expected and intended behavior all along.
[String/UUID change made/needed]: None.
Attachment #8783332 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/d87ce8e5c2df
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Hello, could you please verify this issue is fixed as expected on a latest Nightly build? Thanks!
Flags: needinfo?(M8R-p7tp8h)
Comment on attachment 8783332 [details]
Bug 1296934: Prevent background pages from showing up in global history.

One-liner, has automated tests, seems low risk, Aurora50+
Attachment #8783332 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Yes, confirming that in Nightly 2016-08-26 I now get the Expected Results when performing the Steps.
Thank you, everyone!
Flags: needinfo?(M8R-p7tp8h)
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.