B2G/QA/WebAPI Test Plan/Contacts: Difference between revisions

< B2G‎ | QA‎ | WebAPI Test Plan
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 73: Line 73:


== Tests ==
== Tests ==
=== Performance tests ====
** Not implemented yet (see https://bugzilla.mozilla.org/show_bug.cgi?id=746439 )
=== Marionette/JS ===
=== Marionette/JS ===
** Not implemented yet.
* Importing of contacts from the SIM card. See also {{bug|758457}}
 
=== Basic Positive Tests ===
** Not implemented yet.


=== mochitest-plain===
=== mochitest-plain===
** http://mxr.mozilla.org/mozilla-central/source/dom/contacts/tests/
* Existing tests: http://mxr.mozilla.org/mozilla-central/source/dom/contacts/tests/
* More tests needed for various input validations. For example pass arrays into the API instead of singe strings
* Tests needed for the find function
* Tests needed for the oncontactChange event


==== Sanity Tests ====
==== Sanity Tests ====
** See mochitests
* See mochitests


==== Basic Negative Tests ====
==== Basic Negative Tests ====
** Not implemented yet.
* Not implemented yet.


=== Test App Design ===
=== Test App Design ===
** Not implemented yet.
* Not implemented yet.
** Note that there is a Contacts app from inside Gaia with an import contacts feature in it.
 


----
----
Line 98: Line 97:


=== URLS ===
=== URLS ===
http://mxr.mozilla.org/mozilla-central/source/dom/contacts/ContactManager.js#513
* http://mxr.mozilla.org/mozilla-central/source/dom/contacts/ContactManager.js#513
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMContactManager.idl#37
* http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMContactManager.idl#37
http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMContactProperties.idl#43
* http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMContactProperties.idl#43
* http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMMozContactChangeEvent.idl

Latest revision as of 16:34, 20 August 2012

B2G Contacts API Test Plan

Summary

Lead Martijn Wargers (irc: mw22)
Contributors TBD
API Description Provides read/write DOM API access to the device address book, and the contacts contained therein.
API Developer Gregory Wagner
API Project Page Contacts API
API Tracking Bugs bug 674720
API Status Delivered and ready for test

Scope

This test plan covers functional testing of the Contacts API as delivered for Boot2Gecko.

Strategy

Most Contact tests can be added to Mochitest, and a test app should be created to verify the API on-device.

API

Contacts API is part of the nsIDOMNavigator interface, when the "dom.mozContacts.enabled" preference is set to true.

nsIDOMNavigator (subset)

Attributes

The API is mentioned here: https://wiki.mozilla.org/WebAPI/ContactsAPI#Proposed_API

There is an object in window.navigator named mozContacts with the following interface: interface nsIDOMContactManager : nsISupports {

 nsIDOMDOMRequest find(in nsIDOMContactFindOptions options);
 nsIDOMDOMRequest clear();
 nsIDOMDOMRequest save(in nsIDOMContact contact);
 nsIDOMDOMRequest remove(in nsIDOMContact contact);
 nsIDOMDOMRequest getSimContacts(in DOMString type);
 attribute nsIDOMEventListener oncontactchange;

};

interface nsIDOMContact : nsIDOMContactProperties {

 attribute DOMString id;
 readonly attribute jsval     published;
 readonly attribute jsval     updated;
 void init(in nsIDOMContactProperties properties);  // Workaround BUG 723206

};

interface nsIDOMContactFindOptions : nsISupports {

 attribute DOMString filterValue;  // e.g. "Tom"
 attribute DOMString filterOp;     // e.g. "contains"
 attribute jsval filterBy;         // DOMString[], e.g. ["givenName", "nickname"]
 attribute DOMString sortBy;       // "givenName" or "familyName"
 attribute DOMString sortOrder;    // e.g. "descending"
 attribute unsigned long filterLimit;

};

For other (nsIDOMContactProperties, etc), see: http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/contacts/nsIDOMContactProperties.idl

Tests

Marionette/JS

  • Importing of contacts from the SIM card. See also bug 758457

mochitest-plain

Sanity Tests

  • See mochitests

Basic Negative Tests

  • Not implemented yet.

Test App Design

  • Not implemented yet.
    • Note that there is a Contacts app from inside Gaia with an import contacts feature in it.



This page is based on the WebAPI Test Plan Template

URLS