Closed
Bug 889673
Opened 12 years ago
Closed 12 years ago
Adapt Contacts Unit Tests for Android
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: stully, Assigned: stully)
References
Details
Attachments
(1 file, 2 obsolete files)
|
16.46 KB,
patch
|
Details | Diff | Splinter Review |
The contacts unit tests need adapting for the Android contacts API implementation.
This mainly includes:
* Removing the explict import of the fallback ContactService.jsm.
* Ensure that name field is always consistent with the prefix, given name, family name, and suffix fields.
* Ignoring the implicitly added default category.
* Ignoring failures of the getRevision() function.
* Ignoring tests of the updated and published contact properties.
* Changing a few comparisons of the name field to arrays rather than string.
| Assignee | ||
Comment 1•12 years ago
|
||
Tests pass on B2G (obviously they fail on Android until the contacts API for Android is landed). https://tbpl.mozilla.org/?tree=Try&rev=76e7c1341749
Attachment #770577 -
Flags: review?(anygregor)
Comment 2•12 years ago
|
||
Comment on attachment 770577 [details] [diff] [review]
Adapt contacts unit tests for Android
I am currently not in the office and have a big review backlog. I will be back on Monday. Maybe Reuben can do an initial pass.
Attachment #770577 -
Flags: review?(reuben.bmo)
| Assignee | ||
Comment 3•12 years ago
|
||
No problem. Sorry for dumping all these contacts related reviews on you!
Comment 4•12 years ago
|
||
Comment on attachment 770577 [details] [diff] [review]
Adapt contacts unit tests for Android
Review of attachment 770577 [details] [diff] [review]:
-----------------------------------------------------------------
Patch looks OK, but we need to figure out how to run them on Android *and* Desktop :) review- because of that.
Any reason why you're not simply checking the platform before you load ContactService/PermissionPromptHelper?
Attachment #770577 -
Flags: review?(reuben.bmo) → review-
| Assignee | ||
Comment 5•12 years ago
|
||
I'm not sure what you mean by run them on Android and desktop. As far as I know, desktop would use the fallback contacts (the same as B2G). This patch is only to adapt the unit tests for Android.
I'm also not sure where the PermissionPromptHelper comes into play here. The patch removes the import of PermissionPromptHelper because it should already be loaded elsewhere since the contacts API implmentation relies on it, not the unit tests.
| Assignee | ||
Comment 6•12 years ago
|
||
Re-added imports of ContactService.jsm and PermissionPromptHelper.jsm.
Attachment #770577 -
Attachment is obsolete: true
Attachment #770577 -
Flags: review?(anygregor)
Attachment #771122 -
Flags: review?(reuben.bmo)
Comment 7•12 years ago
|
||
Comment on attachment 771122 [details] [diff] [review]
Adapt contacts unit tests for Android
Review of attachment 771122 [details] [diff] [review]:
-----------------------------------------------------------------
r=reuben with the key test added back or explained :)
::: dom/contacts/tests/test_contacts_basics.html
@@ -84,5 @@
> nickname: "nicktest",
> tel: [{type: ["work"], value: "123456", carrier: "testCarrier"} , {type: ["home", "fax"], value: "+55 (31) 9876-3456"}, {type: ["home"], value: "+49 451 491934"}],
> adr: adr1,
> email: [{type: ["work"], value: "x@y.com"}],
> - key: "4343JEGJGERNBEGOI34G3WGVERBERB"
Why did you remove this?
Attachment #771122 -
Flags: review?(reuben.bmo) → review+
| Assignee | ||
Comment 8•12 years ago
|
||
I removed it because it seems like prop1 is a minimal set of properties, whereas prop2 is a full contact and the key field isn't exactly a "core" field. I was actually the one that added it in bug 807688, but looking at it again now, it seems like it shouldn't be there. It can stay though if you want.
| Assignee | ||
Comment 9•12 years ago
|
||
Updated for changes in bug 892497
Attachment #771122 -
Attachment is obsolete: true
| Assignee | ||
Updated•12 years ago
|
Attachment #778118 -
Flags: review?(khuey)
Comment 10•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Comment on attachment 778118 [details] [diff] [review]
Adapt contacts unit tests for Android
I'm assuming my review is no longer needed. Ask again if I'm wrong.
Attachment #778118 -
Flags: review?(khuey)
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
•