Closed
Bug 607860
Opened 14 years ago
Closed 14 years ago
remove navigator.mozNotification from Firefox desktop
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: dougt, Assigned: dougt)
Details
Attachments
(1 file)
9.60 KB,
patch
|
sicking
:
review+
jst
:
review+
|
Details | Diff | Splinter Review |
Jonas mentioned over IRC we should consider removing navigator.mozNotification from FF desktop.
I am not entirely convinced we should, but we should discuss.
We (and every other browser vendor) have been pushing hard the message that people should use feature detection rather than browser detection. So we want them to do things like
function myNotify(body, title, callback) {
if ("Notification" in window) {
var x = new Notification(myiconurl, title, body);
x.onclick = callback;
}
else if ("mozNotification" in navigator) {
var x = navigator.mozNotification.createNotification(myiconurl, title, body);
x.show(callback);
}
else {
...fallback code, maybe use alert()...
}
}
That doesn't work if we expose function which doesn't "work" on some platforms.
Assignee | ||
Comment 2•14 years ago
|
||
i can add a pref that can be set in fennec (or by an addon for ff desktop). sounds good, jonas?
Yup, that'd be awesome.
Updated•14 years ago
|
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Assignee | ||
Comment 4•14 years ago
|
||
worked locally. pushed to try.
Assignee: nobody → doug.turner
Attachment #486681 -
Flags: review?(jonas)
Comment on attachment 486681 [details] [diff] [review]
patch v.1
Looks good to me, but I'd like to have either peterv or jst look at the nsDOMClassInfo.cpp changes.
Attachment #486681 -
Flags: review?(peterv)
Attachment #486681 -
Flags: review?(jonas)
Attachment #486681 -
Flags: review+
Assignee | ||
Comment 6•14 years ago
|
||
peterv, do you have time to review?
Assignee | ||
Updated•14 years ago
|
Attachment #486681 -
Flags: review?(peterv) → review?(jst)
Assignee | ||
Comment 7•14 years ago
|
||
jst/jonas. i think we want this for ff4.
blocking2.0: --- → betaN+
Updated•14 years ago
|
Attachment #486681 -
Flags: review?(jst) → review+
Assignee | ||
Comment 8•14 years ago
|
||
Comment on attachment 486681 [details] [diff] [review]
patch v.1
wanted for ff4.
Attachment #486681 -
Flags: approval2.0?
Assignee | ||
Comment 9•14 years ago
|
||
Assignee | ||
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•14 years ago
|
Attachment #486681 -
Flags: approval2.0?
Assignee | ||
Comment 10•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/845b9487ffb3 (disabling tests)
Tests were disabled because they were failing:
5268 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/notification/test_basic_notification.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - Permission denied for <http://mochi.test:8888> to get property XPCComponents.classes at http://mochi.test:8888/tests/dom/tests/mochitest/notification/notification_common.js:76
5271 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/notification/test_basic_notification_click.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - Permission denied for <http://mochi.test:8888> to get property XPCComponents.classes at http://mochi.test:8888/tests/dom/tests/mochitest/notification/notification_common.js:76
5274 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/notification/test_leak_windowClose.html | [SimpleTest/SimpleTest.js, window.onerror] An error occurred - is_feature_enabled is not defined at http://mochi.test:8888/tests/dom/tests/mochitest/notification/test_leak_windowClose.html:13
Because these tests do not test anything in Firefox (as we disabled this feature), we just removed notifications from the makefile dirs.
The feature is only enabled on mobile which uses IPC, and IPC mochitests do not completely work :(
When we re-enable for firefox desktop, we will re-enable these tests.
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•