blob: 436ee080674165d615fa8997f393dca748f9a37c [file] [log] [blame]
Tests the interfaces of the Contact Picker API, which include ContactsManager and extensions to Navigator.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ContactsManager instanceof Function is true
PASS typeof ContactsManager is "function"
PASS navigator.contacts instanceof ContactsManager is true
PASS Object.getPrototypeOf(navigator.contacts) === ContactsManager.prototype is true
PASS ContactsManager.prototype.getProperties instanceof Function is true
PASS ContactsManager.prototype.select instanceof Function is true
PASS ContactsManager() threw exception TypeError: Illegal constructor.
PASS new ContactsManager() threw exception TypeError: Illegal constructor.
PASS ContactsManager.toString() is "function ContactsManager() {\n [native code]\n}"
PASS navigator.contacts.toString() is "[object ContactsManager]"
PASS navigator.contacts.getProperties() instanceof Promise is true
PASS navigator.contacts.select(['name', 'email'], {multiple: true}) instanceof Promise is true
PASS successfullyParsed is true
TEST COMPLETE