Clicking "Show desktop notifications" doesn't toggle the menu item

VERIFIED FIXED in Firefox 20

Status

()

Firefox
SocialAPI
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: markh, Assigned: markh)

Tracking

Trunk
Firefox 21
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox20+ verified, firefox21 verified)

Details

(Whiteboard: [testday-20130301])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

5 years ago
STR:
* Start with social enabled.
* On the toolbar, click "Show desktop notifications"

Expected:
* The item on the toolbar has it's "checked" state toggled.

Actual:
* The item on the toolbar does not change.
(Assignee)

Comment 1

5 years ago
Created attachment 704389 [details] [diff] [review]
Update the command when the pref changes.

We already add an observer for the relevant pref, but the observe() function doesn't actually handle it.  This patch fixes that and adds a test.
Assignee: nobody → mhammond
Attachment #704389 - Flags: review?(felipc)
Comment on attachment 704389 [details] [diff] [review]
Update the command when the pref changes.

Review of attachment 704389 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/base/content/test/social/browser_social_toolbar.js
@@ +162,5 @@
> +    let cmd = document.getElementById("Social:ToggleNotifications");
> +    is(cmd.getAttribute("checked"), enabled ? "true" : "false");
> +    enabled = !enabled;
> +    Services.prefs.setBoolPref("social.toast-notifications.enabled", enabled);
> +    is(cmd.getAttribute("checked"), enabled ? "true" : "false");

Can you call Services.prefs.clearUserPref("social.toast-notifications.enabled"); after this?
Attachment #704389 - Flags: review?(felipc) → review+
(Assignee)

Comment 3

5 years ago
Created attachment 704406 [details] [diff] [review]
As landed
Attachment #704389 - Attachment is obsolete: true
Attachment #704406 - Flags: review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/39aa8c99853c
Flags: in-testsuite+
OS: Windows 7 → All
Hardware: x86_64 → All
(Assignee)

Updated

5 years ago
Blocks: 809694
(Assignee)

Comment 5

5 years ago
Backed out in rev https://hg.mozilla.org/integration/mozilla-inbound/rev/f083ee78f36d due to incorrect reviewer specified in checkin message.

Relanded with correct message in https://hg.mozilla.org/integration/mozilla-inbound/rev/755f6994fbd6

Comment 6

5 years ago
https://hg.mozilla.org/mozilla-central/rev/755f6994fbd6
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
tracking-firefox20: --- → +
Comment on attachment 704406 [details] [diff] [review]
As landed

[Triage Comment]
Attachment #704406 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/e99c2df4862d
status-firefox20: --- → fixed
status-firefox21: --- → fixed
I confirm the fix is verified on FF 20.b2 on Windows 7 x64, Ubuntu 12.04 x86 and Mac OS 10.8:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Mozilla/5.0 (X11; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0
status-firefox20: fixed → verified
Whiteboard: [testday-20130301]
(In reply to MarioMi (:MarioMi) from comment #9)

Verified fixed on FF 21b1 too:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0
Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0

Builds ID: 20130401192816
Status: RESOLVED → VERIFIED
status-firefox21: fixed → verified
You need to log in before you can comment on or make changes to this bug.