Closed
Bug 1015100
Opened 10 years ago
Closed 10 years ago
Polish the Alarm API Mochitest
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: airpingu, Assigned: airpingu)
References
Details
Attachments
(3 files, 2 obsolete files)
1.96 KB,
patch
|
Details | Diff | Splinter Review | |
1.66 KB,
patch
|
Luqman
:
review+
|
Details | Diff | Splinter Review |
8.25 KB,
patch
|
Luqman
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Since we already did this for add(), there is no reason for not doing so for remove() and getAll(). The Alarm API logic is relying on the valid manifest URL to manage alarms, so |manifestURL| has to be valid.
Assignee | ||
Comment 2•10 years ago
|
||
Just polished the logic of failed cases to avoid accessing the null domRequest: TypeError: domRequest is undefined at http://mochi.test:8888/tests/dom/alarm/test/test_alarm_add_date.html:62
Assignee | ||
Comment 3•10 years ago
|
||
In bug 876980 and bug 867868, we already supported Alarm API for installed apps on Firefox desktop, so the check for b2g only here doesn't make sense. Polish the tests by introducing a more reasonable checking condition.
Assignee | ||
Comment 4•10 years ago
|
||
Full try: https://tbpl.mozilla.org/?tree=Try&rev=00a5c26a0898
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8427666 -
Attachment is obsolete: true
Assignee | ||
Comment 6•10 years ago
|
||
Comment on attachment 8427663 [details] [diff] [review] Part 1, check manifestURL for getAll/remove (won't land) Please see comment #1 for the summary.
Attachment #8427663 -
Flags: review?(nsm.nikhil)
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8427664 [details] [diff] [review] Part 2, polish tests to avoid accessing null request Please see comment #2 for the summary.
Attachment #8427664 -
Flags: review?(me+bugzilla)
Assignee | ||
Comment 8•10 years ago
|
||
Comment on attachment 8427821 [details] [diff] [review] Part 3, polish tests to not run on invalid builds, V2 Please see comment #3 for the summary.
Attachment #8427821 -
Flags: review?(me+bugzilla)
Assignee | ||
Comment 9•10 years ago
|
||
Please comment #3 for the summary.
Attachment #8427821 -
Attachment is obsolete: true
Attachment #8427821 -
Flags: review?(me+bugzilla)
Attachment #8427824 -
Flags: review?(me+bugzilla)
Assignee | ||
Comment 10•10 years ago
|
||
Try: https://tbpl.mozilla.org/?tree=Try&rev=7a0be2b67f29
Comment on attachment 8427663 [details] [diff] [review] Part 1, check manifestURL for getAll/remove (won't land) Review of attachment 8427663 [details] [diff] [review]: ----------------------------------------------------------------- r+ for the code, but while this does make the API uniform, it breaks the API contract. remove() and getAll() initially promised not to throw. :) Do we have a policy in b2g for when we break APIs? Which release will this land in? Please ask a b2g/webapi owner/peer about this.
Attachment #8427663 -
Flags: review?(nsm.nikhil)
Updated•10 years ago
|
Attachment #8427664 -
Flags: review?(me+bugzilla) → review+
Updated•10 years ago
|
Attachment #8427824 -
Flags: review?(me+bugzilla) → review+
Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Nikhil Marathe [:nsm] (needinfo? please) from comment #11) > Comment on attachment 8427663 [details] [diff] [review] > Part 1, check manifestURL for getAll/remove > > Review of attachment 8427663 [details] [diff] [review]: > ----------------------------------------------------------------- > > r+ for the code, but while this does make the API uniform, it breaks the API > contract. remove() and getAll() initially promised not to throw. :) > Do we have a policy in b2g for when we break APIs? Which release will this > land in? > > Please ask a b2g/webapi owner/peer about this. Yeap, after some thoughts, I decide to not to land the part-1 patch, because: 1. If users already failed to call add() to add an alarm, they wouldn't attempt to call getAll() or remove() to manage an alarm that has been added. 2. If users want to call getAll()/remove() without calling add() first, in the original codes it would just do nothing. Adding a throw might break the apps in the field. To avoid breaking the compatibility in the field, we'd better not to do this change.
Assignee | ||
Updated•10 years ago
|
Attachment #8427663 -
Attachment description: Part 1, check manifestURL for getAll/remove → Part 1, check manifestURL for getAll/remove (won't land)
Assignee | ||
Comment 13•10 years ago
|
||
Btw, if we still hope to throw for getAll()/remove(), I tend to fire another bug for it. Let this bug just polish the tests only.
Assignee | ||
Comment 14•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/c1cc2ffe8bfd https://hg.mozilla.org/integration/b2g-inbound/rev/9aa3042c0023
Assignee | ||
Updated•10 years ago
|
Flags: in-testsuite+
Comment 15•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c1cc2ffe8bfd https://hg.mozilla.org/mozilla-central/rev/9aa3042c0023
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•