B2G/QA/WebAPI Test Plan/Vibration: Difference between revisions
< B2G | QA | WebAPI Test Plan
(Created page with "=B2G Screen Orientation API Test Plan= == Summary == {| class="fullwidth-table" |- | style="width:28%" | '''Lead''' | [mailto:mwargers@mozilla.com Martijn Wargers] (irc: mw22...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 20: | Line 20: | ||
|- | |- | ||
| '''API Tracking Bugs''' | | '''API Tracking Bugs''' | ||
| {{bug| 679966}} | | {{bug|679966}} | ||
|- | |- | ||
| '''API Status''' | | '''API Status''' | ||
Line 40: | Line 40: | ||
** when screen turned off | ** when screen turned off | ||
** Full screen | ** Full screen | ||
** related prefs: dom.vibrator.enabled , dom.vibrator.max_vibrate_ms | ** related prefs: dom.vibrator.enabled , dom.vibrator.max_vibrate_ms , dom.vibrator.max_vibrate_list_len | ||
== API == | == API == | ||
Line 57: | Line 57: | ||
=== mochitest-plain=== | === mochitest-plain=== | ||
* http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/general/test_vibrator.html | |||
==== Sanity Tests ==== | ==== Sanity Tests ==== | ||
* Verify vibrate() doesn't throw with valid input, but does throw with invalid input: http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/general/test_vibrator.html | * Verify vibrate() doesn't throw with valid input, but does throw with invalid input: http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/general/test_vibrator.html | ||
Line 62: | Line 63: | ||
==== Basic Negative Tests ==== | ==== Basic Negative Tests ==== | ||
* See Sanity Tests | * See Sanity Tests | ||
=== Test App Design === | === Test App Design === |
Latest revision as of 20:35, 30 July 2012
B2G Screen Orientation API Test Plan
Summary
Lead | Martijn Wargers (irc: mw22) |
Contributors | TBD |
API Description | Makes the device vibrate when this api is called |
API Developer | Justin Lebar |
API Project Page | Vibration |
API Tracking Bugs | bug 679966 |
API Status | Delivered and ready for test |
Scope
This test plan covers functional testing of the Vibration API as delivered for Boot2Gecko. It does not attempt to cover performance, security, or other kinds of testing at this time.
Strategy
Since there is no automated way to test if the device is actually vibrating when the API is called, we need manual tests for that. Some basic sanity tests can be added to Mochitest for other platforms, and a test app should be created to verify the API on-device.
- Some other areas that could be tested:
- inside (hidden and multiple) iframes
- while in the background/background tab
- on a deleted window/iframe
- when screen turned off
- Full screen
- related prefs: dom.vibrator.enabled , dom.vibrator.max_vibrate_ms , dom.vibrator.max_vibrate_list_len
API
Vibration API is defined as part of the nsIDOMNavigator interface. It includes the vibrate() method to let the device vibrate or let it stop vibrating.
devmo article
Vibration API Specification
Methods
- void vibrate(in jsval aPattern);
Tests
Marionette/JS
Basic Positive Tests
mochitest-plain
Sanity Tests
- Verify vibrate() doesn't throw with valid input, but does throw with invalid input: http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/general/test_vibrator.html
Basic Negative Tests
- See Sanity Tests
Test App Design
Basic test application can be found here.
This page is based on the WebAPI Test Plan Template