Closed Bug 1132971 Opened 11 years ago Closed 10 years ago

Setting the preference extensions.getAddons.showPane to false causes the Add-ons Manager not to work correctly

Categories

(Toolkit :: Add-ons Manager, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file, 1 obsolete file)

The preference extensions.getAddons.showPane can be set to false to prevent the "discovering addons" pane from displaying. If you create a new profile, set it and then open the add-ons manager, the extensions pane doesn't display properly and you get this error on the console: NS_ERROR_FAILURE: Root node doesn't exist for 'discover' view extensions.js:717 This is a regression since this feature was fixed in bug #601442
Attached file MozReview Request: bz://1132971/mkaply (obsolete) —
/r/6787 - Bug 1132971 - Don't assume that the add-ons discovery pane will be available Pull down this commit: hg pull -r 0aa57515f92bf90991ba4be1107407bbe6ab6754 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8590326 - Flags: review?(dtownsend)
(In reply to Mike Kaply [:mkaply] from comment #1) > Created attachment 8590326 [details] > MozReview Request: bz://1132971/mkaply > > /r/6787 - Bug 1132971 - Don't assume that the add-ons discovery pane will be > available > > Pull down this commit: > > hg pull -r 0aa57515f92bf90991ba4be1107407bbe6ab6754 > https://reviewboard-hg.mozilla.org/gecko/ This seems like something that is extremely regression prone without us noticing, is it possible to get a test?
Flags: needinfo?(mozilla)
> This seems like something that is extremely regression prone without us noticing Well the code wouldn't be any different unless isDiscoverEnabled is false (which isn't the default). I thought about making the change much smaller by keeping VIEW_DEFAULT and just changing it to a var, but that seemed wrong because in Mozilla, consts are upper case. > is it possible to get a test? That's a good question. I honestly don't know. In the past, I've had trouble figuring out how to write tests for Firefox in general. What would I use to write a test for something like this?
Flags: needinfo?(mozilla)
(In reply to Mike Kaply [:mkaply] from comment #3) > > This seems like something that is extremely regression prone without us noticing > > Well the code wouldn't be any different unless isDiscoverEnabled is false > (which isn't the default). > > I thought about making the change much smaller by keeping VIEW_DEFAULT and > just changing it to a var, but that seemed wrong because in Mozilla, consts > are upper case. > > > is it possible to get a test? > > That's a good question. I honestly don't know. In the past, I've had trouble > figuring out how to write tests for Firefox in general. What would I use to > write a test for something like this? A browser-chrome test would be the best. We have a bunch that open the add-ons manager. You could write one that sets the pref and opens the manager and checks it displays properly. This one already claims to test the discovery pane, maybe add an extra bit to that: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/test/browser/browser_discovery.js
(In reply to Mike Kaply [:mkaply] from comment #5) > Ironically there is a test for this. > > http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/ > test/browser/browser_discovery.js#581 > > It clearly doesn't work :) Looks like that forcibly opens the extensions list when opening the manager. You'll want to not open any specific pane (let it open the default) and also clear the last selected pane before opening, I don't recall if that is in localstore though which might be annoying to do.
Comment on attachment 8590326 [details] MozReview Request: bz://1132971/mkaply /r/6787 - Bug 1132971 - Don't assume that the add-ons discovery pane will be available Pull down this commit: hg pull -r da07f23561a53bcad6e1726e75317dfb4542b049 https://reviewboard-hg.mozilla.org/gecko/
Now with test!
Attachment #8590326 - Flags: review?(dtownsend) → review+
Comment on attachment 8590326 [details] MozReview Request: bz://1132971/mkaply https://reviewboard.mozilla.org/r/6785/#review5695 Awesome, thanks for adding the test. ::: toolkit/mozapps/extensions/test/browser/browser_discovery.js (Diff revision 2) > + Services.prefs.setBoolPref(PREF_DISCOVER_ENABLED, false); Please reset the pref after the test is done, to make sure if we add later tests we don't confuse later tests.
https://hg.mozilla.org/integration/mozilla-inbound/rev/0b901409f138 With the additional change to reset the pref.
FYI, I had to do a second checkin for this. I didn't realize that another test: http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/test/browser/browser_bug679604.js Had defined PREF_UI_LASTCATEGORY I didn't find this because I didn't run the entire test suite. Lesson learned. I removed the definition from that file. https://hg.mozilla.org/integration/mozilla-inbound/rev/49b6aed6b2e2
Assignee: nobody → mozilla
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8590326 - Attachment is obsolete: true
Attachment #8619494 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: