Closed
Bug 1427107
Opened 7 years ago
Closed 7 years ago
Invalid badge background color behaves as null
Categories
(WebExtensions :: Frontend, defect, P5)
WebExtensions
Frontend
Tracking
(firefox59 verified, firefox60 verified)
VERIFIED
FIXED
mozilla59
People
(Reporter: Oriol, Assigned: Oriol)
Details
Attachments
(3 files, 1 obsolete file)
Run this code:
browser.browserAction.setBadgeBackgroundColor({color: "red"});
browser.browserAction.setBadgeBackgroundColor({tabId, color: "green"});
browser.browserAction.setBadgeBackgroundColor({tabId, color: "invalid"});
Since "invalid" is not a color, it behaves as null, i.e. it removes the tab-specific green color and the tab inherits the global red color.
However, Chrome behaves differently. There the "invalid" color is ignored, so the tab continues having a green tab-specific color. And a warning is logged.
I think compatibility with Chrome should be preferred, if someone wants to remove a tab-specific color, since bug 1419940 they can explicitly use null, which is less hacky than an invalid color.
Assignee | ||
Comment 1•7 years ago
|
||
There was a mistake in the attached test webext
Attachment #8938893 -
Attachment is obsolete: true
Updated•7 years ago
|
Priority: -- → P5
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Summary: Invalid badge background color behaves an null → Invalid badge background color behaves as null
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8941904 [details]
Bug 1427107 - Reject setBadgeBackgroundColor promise for invalid string colors
https://reviewboard.mozilla.org/r/212120/#review218914
Attachment #8941904 -
Flags: review?(mixedpuppy) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 4•7 years ago
|
||
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.
hg error in cmd: hg rebase -s ee783915e508a3257642d4fc4eb183b020963b09 -d 7be74a94e766: rebasing 442801:ee783915e508 "Bug 1427107 - Reject setBadgeBackgroundColor promise for invalid string colors r=mixedpuppy" (tip)
merging browser/components/extensions/ext-browserAction.js
merging browser/components/extensions/test/browser/browser_ext_browserAction_context.js
warning: conflicts while merging browser/components/extensions/ext-browserAction.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Comment hidden (mozreview-request) |
Comment 6•7 years ago
|
||
The code base has been updated and the patch fails to apply now. Please push fix the issue and push the updated patch to review board. Thank you.
Flags: needinfo?(oriol-bugzilla)
Keywords: checkin-needed
Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bc54bd9b08c8
Reject setBadgeBackgroundColor promise for invalid string colors r=mixedpuppy
Keywords: checkin-needed
Comment 9•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 10•7 years ago
|
||
Tested with the latest build and the only difference I see from before the fix is that the color of the "abcd" background is red by default and in the latest fix it's green. Is this the desired behavior along with the "Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page." warning?
Flags: needinfo?(oriol-bugzilla)
Assignee | ||
Comment 11•7 years ago
|
||
Yes, the desired behavior is that the badge background color should be green on the tab where you installed the extension, just like Chrome. The event pages warning is unrelated.
Flags: needinfo?(oriol-bugzilla)
Comment 12•7 years ago
|
||
As per https://bugzilla.mozilla.org/show_bug.cgi?id=1427107#c10 setting this issue to verified on Windows 10 64 Bit Firefox 60.0a1 (20180123102017).
Updated•7 years ago
|
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•