Closed Bug 1551490 Opened 3 months ago Closed 3 months ago

Fix test failures triggered by enabling HTML about:addons by default

Categories

(Toolkit :: Add-ons Manager, task, P1)

68 Branch
task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox68 --- fixed
firefox69 --- fixed

People

(Reporter: rpl, Assigned: rpl)

References

(Blocks 1 open bug)

Details

Attachments

(14 files, 1 obsolete file)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

The goal of this issue is to investigate and fix test failures triggered by enabling the HTML about addons by default.

The test failures to investigate are currently listed in the following google doc:

In the above google doc, the failing tests are organized in the following groups:

  • Tests that depends from inline options_page support (which also depends on Bug 1532724)
  • Tests that depends from sideloaded extensions showing the permissions prompt when enabled from about:addons (fix tracked by Bug 1551541)
  • Test that uses test helpers that depends from XUL about:addons
  • Other test failures to investigate (which may be due to failures in other tests running right before it, or unrelated intermittents)
Assignee: nobody → lgreco
Blocks: 1533795
Status: NEW → ASSIGNED
Priority: -- → P1
Depends on: 1551541
Depends on: 1552170
Depends on: 1552184
Depends on: 1552518

browser_bug562797.js was setting the XUL disco pane url to a fake test url and never resetting it after the
test completes [1], and so we never notice that other tests may fail if the discover url is not set to one that
doesn't trigger network requests while running in a test.

[1] See https://searchfox.org/mozilla-central/rev/f4c39907e0b527dc4b9356a1eeb8c6e6c62d383a/toolkit/mozapps/extensions/test/browser/browser_bug562797.js#74

Depends on D31782

Attachment #9066028 - Attachment description: Bug 1551490 - Fix enterprise policy test failues when HTMl about:addons is enabled by default. → Bug 1551490 - Fix enterprise policy test failures when HTMl about:addons is enabled by default.
Attachment #9066028 - Attachment description: Bug 1551490 - Fix enterprise policy test failures when HTMl about:addons is enabled by default. → Bug 1551490 - Fix enterprise policy test failures when HTML about:addons is enabled by default.
See Also: → 1553650
Attachment #9066034 - Attachment is obsolete: true
Blocks: 1555012
No longer depends on: 1552518
No longer depends on: 1552170

When HTML about:addons is enabled, the "Manage extension" button still
opens the add-on's details page, but without automatically loading the
inline options.

The test assumed that it did and failed. This patch switches to a
different way of detecting that the menu item works as expected.

Attachment #9066033 - Attachment description: Bug 1551490 - Rename browser_Bug 1551490 to browser_history_navigation and run on XUL and HTML about:addons. → Bug 1551490 - Rename browser_bug562797 to browser_history_navigation and run on XUL and HTML about:addons.

Fix browser_webext_incognito.js to work with both XUL and HTML about:addons.

This patch also ensures that (inline) options UI is only shown in HTML
about:addons in private windows if add-ons are allowed access to it.
browser_webext_incognito.js serves as a unit test for this.

Attachment #9070871 - Attachment description: Bug 1551490 - Fix browser_reinstall.js with HTML about:addons → Bug 1551490 - Fix browser_reinstall.js with HTML about:addons
Pushed by rob@robwu.nl:
https://hg.mozilla.org/integration/autoland/rev/06890fefc1d3
Fix enterprise policy test failures when HTML about:addons is enabled by default. r=mkaply,rpl
https://hg.mozilla.org/integration/autoland/rev/7654a4fe63b6
Run browser_CTP_plugins.js on both XUL and HTML about:addons page. r=aswan,rpl
https://hg.mozilla.org/integration/autoland/rev/49f83d8848ff
Fix browser_gmpProvider and run tests on XUL and HTML about:addons. r=mossop
https://hg.mozilla.org/integration/autoland/rev/d316cf637ff9
Fix failures when browser_update_checkForUpdate run with HTML about:addons enabled. r=aswan
https://hg.mozilla.org/integration/autoland/rev/92b3d4c40e67
Fix browser_dragdrop.js and fold browser_dragdrop_incompat into it. r=kmag
https://hg.mozilla.org/integration/autoland/rev/a9b1a1ab0ec5
Rename browser_bug562797 to browser_history_navigation and run on XUL and HTML about:addons. r=kmag,rpl
https://hg.mozilla.org/integration/autoland/rev/8c02c8dfd237
Disable HTML about:addons on legacy XUL about:addons tests. r=kmag,rpl
https://hg.mozilla.org/integration/autoland/rev/54a97cd3d2e6
Fix test failures with inline options in HTML about:addons r=kmag
https://hg.mozilla.org/integration/autoland/rev/f0339946e0f9
Fix tests when abuse reporting is enabled by default r=rpl
https://hg.mozilla.org/integration/autoland/rev/beeeab2762c6
Fix browser_webext_icon.js when HTML about:addons is enabled by default r=rpl
https://hg.mozilla.org/integration/autoland/rev/0ed314d24123
Fix browser_ext_browserAction_contextMenu.js when HTML about:addons is enabled r=rpl
https://hg.mozilla.org/integration/autoland/rev/21074fd8dfe8
Hide add-on preferences when not allowed in private windows, fix browser_webext_incognito.js r=rpl
https://hg.mozilla.org/integration/autoland/rev/7a44faddc33d
Fix browser_reinstall.js with HTML about:addons r=robwu
Regressions: 1558109
Regressions: 1558110
Regressions: 1558348
No longer regressions: 1558348

The output of a non-existing attribute changed in bug 1552714.
In 69, the expectation is {id: null, args: null}.
In 68 and before, the expectation is {id: ""}.

Comment on attachment 9066028 [details]
Bug 1551490 - Fix enterprise policy test failures when HTML about:addons is enabled by default.

Beta/Release Uplift Approval Request

  • User impact if declined: Without these test fixes, we cannot enable HTML about:addons by default (bug 1555012).
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Must land after 1550911
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): These patches fix tests, by running them with and without HTML about:addons.
    The patches have baked on Nightly (with HTML about:addons off by default).
    Try push to Beta is green: https://treeherder.mozilla.org/#/jobs?repo=try&revision=29878f0632a54dd4198a6aa2d32d91c5761c0919 (the two oranges are because I forgot to include the fixes from bug 1557369 and bug 1557944 in the try push)
  • String changes made/needed: none
Attachment #9066028 - Flags: approval-mozilla-beta?
Attachment #9066029 - Flags: approval-mozilla-beta?
Attachment #9066030 - Flags: approval-mozilla-beta?
Attachment #9066031 - Flags: approval-mozilla-beta?
Attachment #9066032 - Flags: approval-mozilla-beta?
Attachment #9066033 - Flags: approval-mozilla-beta?
Attachment #9066044 - Flags: approval-mozilla-beta?
Attachment #9070443 - Flags: approval-mozilla-beta?
Attachment #9070602 - Flags: approval-mozilla-beta?
Attachment #9070617 - Flags: approval-mozilla-beta?
Attachment #9070654 - Flags: approval-mozilla-beta?
Attachment #9070788 - Flags: approval-mozilla-beta?
Attachment #9070871 - Flags: approval-mozilla-beta?
Attachment #9071426 - Flags: approval-mozilla-beta?

Comment on attachment 9070443 [details]
Bug 1551490 - Fix test failures with inline options in HTML about:addons

this one looks like it fixes an actual issue in ExtensionPolicyService? approved for 68.0b10

Attachment #9070443 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9070788 [details]
Bug 1551490 - Hide add-on preferences when not allowed in private windows, fix browser_webext_incognito.js

there's a fix in here too. approved for 68.0b10.

Attachment #9070788 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Everything else appears to be test-only.

Whiteboard: [checkin-needed-beta]
No longer regressions: 1558109
Attachment #9066028 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066029 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066030 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066031 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066032 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066033 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9066044 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9070602 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9070617 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9070654 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9070871 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9071426 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

From my understanding this issue is related to the automated tests. Is there any need of manual QA here? If not can you please mark it as "qe-verify- "

Flags: needinfo?(lgreco)
Flags: needinfo?(lgreco) → qe-verify-
You need to log in before you can comment on or make changes to this bug.