B2G/QA/WebAPI Test Plan/WebSMS: Difference between revisions
< B2G | QA | WebAPI Test Plan
Jump to navigation
Jump to search
(9 intermediate revisions by the same user not shown) | |||
Line 40: | Line 40: | ||
=== Related Prefs === | === Related Prefs === | ||
* <tt>dom.sms.enabled</tt> | * <tt>dom.sms.enabled</tt> | ||
* <tt>dom.sms.whitelist</tt> | * <tt>dom.sms.whitelist</tt> | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMNavigatorSms.idl nsIDOMNavigatorSms] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMNavigatorSms.idl nsIDOMNavigatorSms] : nsISupports === | ||
==== Attributes ==== | ==== Attributes ==== | ||
* | * <tt>readonly nsIDOMMozSmsManager mozSms</tt> | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsCursor.idl nsIDOMSmsCursor] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsCursor.idl nsIDOMSmsCursor] : nsISupports === | ||
==== Attributes ==== | ==== Attributes ==== | ||
* | * <tt>readonly nsIDOMMozSmsMessage message</tt> | ||
==== Methods ==== | ==== Methods ==== | ||
* <tt>void continue()</tt> | * <tt>void continue()</tt> | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsEvent.idl nsIDOMSmsEvent] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsEvent.idl nsIDOMSmsEvent] : nsIDOMEvent === | ||
==== Attributes ==== | ==== Attributes ==== | ||
* | * <tt>readonly nsIDOMMozSmsMessage message</tt> | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsFilter.idl nsIDOMSmsFilter] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsFilter.idl nsIDOMSmsFilter] : nsISupports === | ||
==== Attributes ==== | ==== Attributes ==== | ||
* <tt>jsval startDate</tt><br>Date, can return null | * <tt>jsval startDate</tt><br>Date, can return null | ||
* <tt>jsval endDate</tt><br>Date, can return null | * <tt>jsval endDate</tt><br>Date, can return null | ||
* <tt>jsval numbers</tt><br>Array of DOMString, can return null | * <tt>jsval numbers</tt><br>Array of DOMString, can return null | ||
* <tt>DOMString delivery</tt><br>"sent", "received", or null | * <tt>DOMString delivery</tt><br>"sent", "received", or null | ||
* <tt>jsval read</tt><br>Boolean, can be undefined | * <tt>jsval read</tt><br>Boolean, can be undefined | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsManager.idl nsIDOMSmsManager] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsManager.idl nsIDOMSmsManager] : nsIDOMEventTarget === | ||
==== Methods ==== | ==== Methods ==== | ||
* <tt>unsigned short getNumberOfMessagesForText(in DOMString text)</tt> | * <tt>unsigned short getNumberOfMessagesForText(in DOMString text)</tt> | ||
* <tt>jsval send(in jsval number, in DOMString message)</tt><br>First param can be DOMString (one number) or Array of DOMString (multiple numbers). Returns either SmsRequest or array of SmsRequest accordingly. | |||
* <tt>jsval send(in jsval number, in DOMString message)</tt><br>First param can be DOMString (one number) or Array of DOMString (multiple numbers).<br>Returns either SmsRequest or array of SmsRequest accordingly. | |||
* <tt>nsIDOMMozSmsRequest getMessage(in long id)</tt> | * <tt>nsIDOMMozSmsRequest getMessage(in long id)</tt> | ||
* <tt>nsIDOMMozSmsRequest delete(in jsval param)</tt><br>Param can be either message id or SmsMessage | * <tt>nsIDOMMozSmsRequest delete(in jsval param)</tt><br>Param can be either message id or SmsMessage | ||
* <tt>nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse)</tt> | * <tt>nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse)</tt> | ||
* <tt>nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue)</tt> | * <tt>nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue)</tt> | ||
==== Events ==== | ==== Events ==== | ||
* <tt>onreceived</tt> | * <tt>onreceived</tt> | ||
* <tt>onsent</tt> | * <tt>onsent</tt> | ||
* <tt>ondelivered</tt> | * <tt>ondelivered</tt> | ||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsMessage.idl nsIDOMSmsMessage] === | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsMessage.idl nsIDOMSmsMessage] : nsISupports === | ||
==== Attributes ==== | ==== Attributes ==== | ||
* | * <tt>readonly long id</tt> | ||
* | |||
* | * <tt>readonly DOMString delivery</tt><br>"sent" or "received" | ||
* | |||
* | * <tt>readonly DOMString sender</tt> | ||
* <tt>readonly DOMString receiver</tt> | |||
* <tt>readonly DOMString body></tt> | |||
* <tt>readonly jsval timestamp</tt><br>Date | |||
=== [http://mxr.mozilla.org/mozilla-central/source/ | * <tt>readonly boolean read</tt> | ||
==== | |||
* | === [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsIDOMSmsRequest.idl nsIDOMSmsRequest] : nsIDOMDOMRequest === | ||
| |||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsDatabaseService.idl nsISmsDatabaseService] : nsISupports === | |||
==== Methods ==== | |||
* <tt>long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate)</tt><br>Takes some information required to save the message and returns its id. | |||
* <tt>long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate)</tt><br>Takes some information required to save the message and returns its id. | |||
* <tt>void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId)</tt> | |||
* <tt>void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId)</tt> | |||
* <tt>void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId)</tt> | |||
* <tt>void clearMessageList(in long listId);</tt> | |||
* <tt>void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId);</tt> | |||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsRequestManager.idl nsISmsRequestManager] : nsISupports === | |||
==== Constants ==== | |||
* <tt>unsigned short SUCCESS_NO_ERROR</tt> | |||
* <tt>unsigned short NO_SIGNAL_ERROR</tt> | |||
* <tt>unsigned short NOT_FOUND_ERROR</tt> | |||
* <tt>unsigned short UNKNOWN_ERROR</tt> | |||
* <tt>unsigned short INTERNAL_ERROR</tt> | |||
==== Methods ==== | |||
* <tt>long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest)</tt><br>Create a new request object, return the request ID | |||
* <tt>long addRequest(in nsIDOMMozSmsRequest aRequest)</tt><br>Track an already existing request object, return the request ID | |||
* <tt>void notifySmsSent(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt> | |||
* <tt>void notifySmsSendFailed(in long aRequestId, in long aError)</tt> | |||
* <tt>void notifyGotSms(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt> | |||
* <tt>void notifyGetSmsFailed(in long aRequestId, in long aError)</tt> | |||
* <tt>void notifySmsDeleted(in long aRequestId, in bool aDeleted)</tt> | |||
* <tt>void notifySmsDeleteFailed(in long aRequestId, in long aError</tt> | |||
* <tt>void notifyNoMessageInList(in long aRequestId)</tt> | |||
* <tt>void notifyCreateMessageList(in long aRequestId, in long aListId, in nsIDOMMozSmsMessage aMessage)</tt> | |||
* <tt>void notifyGotNextMessage(in long aRequestId, in nsIDOMMozSmsMessage aMessage)</tt> | |||
* <tt>void notifyReadMessageListFailed(in long aRequestId, in long aError)</tt> | |||
* <tt>void notifyMarkedMessageRead(in long aRequestId, in bool aRead)</tt> | |||
* <tt>void notifyMarkMessageReadFailed(in long aRequestId, in long aError)</tt> | |||
=== [http://mxr.mozilla.org/mozilla-central/source/dom/sms/interfaces/nsISmsService.idl nsISmsService] : nsISupports === | |||
==== Methods ==== | ==== Methods ==== | ||
* <tt>boolean | * <tt>boolean hasSupport()</tt> | ||
* <tt> | |||
* <tt>unsigned short getNumberOfMessagesForText(in DOMString text)</tt> | |||
* <tt>void send(in DOMString number, in DOMString message, in long requestId, [optional] in unsigned long long processId)</tt> | |||
* <tt> | |||
* <tt>nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read)</tt> | |||
== Tests == | == Tests == |
Latest revision as of 01:51, 27 June 2012
B2G WebSMS API Test Plan
Summary
Lead | Geo Mealer (irc: geo) |
Contributors | TBD |
API Description | Send/receive SMS messages as well as manage messages stored on device. |
API Developer | Mounir Lamouri |
API Project Page | WebSMS |
API Tracking Bugs | bug 674725 |
API Status | Mostly done for B2G. |
Scope
A short section should be added here that describes the testing scope of this plan: both what is and is not included, broadly.
Strategy
Explain here how to test the API in question (emulator, device-agnostic CI tests, on-device applications, or a combination).
In the likely case of a combination, discuss how tests will be split between options.
API
Describe the API here. Give a short summary, what the API does, and any considerations or preconditions for using it.
Related Prefs
- dom.sms.enabled
- dom.sms.whitelist
Attributes
- readonly nsIDOMMozSmsManager mozSms
nsIDOMSmsCursor : nsISupports
Attributes
- readonly nsIDOMMozSmsMessage message
Methods
- void continue()
nsIDOMSmsEvent : nsIDOMEvent
Attributes
- readonly nsIDOMMozSmsMessage message
nsIDOMSmsFilter : nsISupports
Attributes
- jsval startDate
Date, can return null
- jsval endDate
Date, can return null
- jsval numbers
Array of DOMString, can return null
- DOMString delivery
"sent", "received", or null
- jsval read
Boolean, can be undefined
nsIDOMSmsManager : nsIDOMEventTarget
Methods
- unsigned short getNumberOfMessagesForText(in DOMString text)
- jsval send(in jsval number, in DOMString message)
First param can be DOMString (one number) or Array of DOMString (multiple numbers).
Returns either SmsRequest or array of SmsRequest accordingly.
- nsIDOMMozSmsRequest getMessage(in long id)
- nsIDOMMozSmsRequest delete(in jsval param)
Param can be either message id or SmsMessage
- nsIDOMMozSmsRequest getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse)
- nsIDOMMozSmsRequest markMessageRead(in long id, in boolean aValue)
Events
- onreceived
- onsent
- ondelivered
nsIDOMSmsMessage : nsISupports
Attributes
- readonly long id
- readonly DOMString delivery
"sent" or "received"
- readonly DOMString sender
- readonly DOMString receiver
- readonly DOMString body>
- readonly jsval timestamp
Date
- readonly boolean read
nsIDOMSmsRequest : nsIDOMDOMRequest
nsISmsDatabaseService : nsISupports
Methods
- long saveReceivedMessage(in DOMString aSender, in DOMString aBody, in unsigned long long aDate)
Takes some information required to save the message and returns its id.
- long saveSentMessage(in DOMString aReceiver, in DOMString aBody, in unsigned long long aDate)
Takes some information required to save the message and returns its id.
- void getMessage(in long messageId, in long requestId, [optional] in unsigned long long processId)
- void createMessageList(in nsIDOMMozSmsFilter filter, in boolean reverse, in long requestId, [optional] in unsigned long long processId)
- void getNextMessageInList(in long listId, in long requestId, [optional] in unsigned long long processId)
- void clearMessageList(in long listId);
- void markMessageRead(in long messageId, in boolean value, in long requestId, [optional] in unsigned long long processId);
nsISmsRequestManager : nsISupports
Constants
- unsigned short SUCCESS_NO_ERROR
- unsigned short NO_SIGNAL_ERROR
- unsigned short NOT_FOUND_ERROR
- unsigned short UNKNOWN_ERROR
- unsigned short INTERNAL_ERROR
Methods
- long createRequest(in nsIDOMMozSmsManager aManager, out nsIDOMMozSmsRequest aRequest)
Create a new request object, return the request ID
- long addRequest(in nsIDOMMozSmsRequest aRequest)
Track an already existing request object, return the request ID
- void notifySmsSent(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
- void notifySmsSendFailed(in long aRequestId, in long aError)
- void notifyGotSms(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
- void notifyGetSmsFailed(in long aRequestId, in long aError)
- void notifySmsDeleted(in long aRequestId, in bool aDeleted)
- void notifySmsDeleteFailed(in long aRequestId, in long aError
- void notifyNoMessageInList(in long aRequestId)
- void notifyCreateMessageList(in long aRequestId, in long aListId, in nsIDOMMozSmsMessage aMessage)
- void notifyGotNextMessage(in long aRequestId, in nsIDOMMozSmsMessage aMessage)
- void notifyReadMessageListFailed(in long aRequestId, in long aError)
- void notifyMarkedMessageRead(in long aRequestId, in bool aRead)
- void notifyMarkMessageReadFailed(in long aRequestId, in long aError)
nsISmsService : nsISupports
Methods
- boolean hasSupport()
- unsigned short getNumberOfMessagesForText(in DOMString text)
- void send(in DOMString number, in DOMString message, in long requestId, [optional] in unsigned long long processId)
- nsIDOMMozSmsMessage createSmsMessage(in long id, in DOMString delivery, in DOMString sender, in DOMString receiver, in DOMString body, in jsval timestamp, in bool read)
Tests
Marionette/JS
Test Type 1
- Test 1
- Test 2
Test Type 2
- Test 1
- Test 2
mochitest-plain
Test Type 1
- Test 1
- Test 2
Test Type 2
- Test 1
- Test 2
Test App Design
Describe application functionality here
This page is based on the WebAPI Test Plan Template