Restart FX will automatically recheck "notify me when a new study comes"



Mozilla Labs Graveyard
Test Pilot
8 years ago
2 years ago


(Reporter: Jinghua zhang, Assigned: Jono Xia)


Mac OS X
Bug Flags:
in-testsuite -
in-litmus ?



(1 attachment, 1 obsolete attachment)



8 years ago
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:2.0b1) Gecko/20100630 Firefox/4.0b1

1. uncheck "notify me when a new study comes" in TP panel
2. restart Firefox

Actually result:
"notify me when a new study comes" is checked.

Expect result:
"notify me when a new study comes" is unchecked.


8 years ago
Severity: normal → critical
Flags: in-testsuite?
Flags: in-litmus?
Priority: -- → P1
Target Milestone: -- → 0.3


8 years ago
Target Milestone: 0.3 → 1.3

Comment 1

8 years ago
Oh dear.  I thought that I was doing this the right way (setting the pref in the default branch, so that it is overridden by any user-created settings) but it looks like I was wrong.

Comment 2

8 years ago
Andres says:

> The problem is that the preferences are not being saved, since the browser.preferences.instantApply is set to false by default on Fx, so changes to the test pilot settings are not being applied immediately. According to, in this case a OK value is needed when closing in order to save the preferences. But as we don't have buttons in this window, the only way to close the TP panel is with the window close button, which don't save the preferences.

So if that's the case, then it's not just changes to the "notify me when a new study comes" pref that's not being saved -- it's all the prefs in the Test Pilot pref pane!!

I would favor saving the prefs in the unload method of the window, or if that doesn't work, adding click handlers to the buttons in the pref pane to save the changes immediately.  I'd prefer not to have to add any buttons or change the value of browser.preferences.instantApply.
Created attachment 462836 [details] [diff] [review]
proposed patch

Saving preferences in the unload window event.

Comment 4

8 years ago
The patch doesn't seem to be working for me on Windows -- even if I just close the all-studies window and then reopen it (without quitting Firefox), my prefs revert to what they were before.

The code looks right, though, so let me play around with it a little more.  Maybe I can figure out what's going on.
Hmm,  ok, we could write a general test case that checks that "state" of TP prefs remains the same on restart. Not going to write a case for each specific pref though. Are restart test cases difficult in automated test suites? I think so.  minusing that.
Flags: in-testsuite? → in-testsuite-
Attachment #462836 - Flags: review?(dtownsend)
Comment on attachment 462836 [details] [diff] [review]
proposed patch

You're breaking the platform consistency by doing this, not sure if I agree with that but I guess that is your call to make.

This code is not very maintainable, you would need to remember to update the JS every time you modify the set of preferences. Instead just do:

Attachment #462836 - Flags: review?(dtownsend) → review-

Comment 7

7 years ago
Created attachment 470055 [details] [diff] [review]
New patch using prefPane.writePreferences instead

Made a new patch using your suggestion.  Please reveiw this one instead.
Attachment #462836 - Attachment is obsolete: true
Attachment #470055 - Flags: review+
Landed in mozilla-central:
Assignee: nobody → jdicarlo
Last Resolved: 7 years ago
Resolution: --- → FIXED
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.