B2G/QA/WebAPI Test Plan/Geolocation: Difference between revisions
< B2G | QA | WebAPI Test Plan
Jump to navigation
Jump to search
(Created page with "=Geolocation API Test Plan= == Summary == {| class="fullwidth-table" |- | style="width:28%" | '''Lead''' | [mailto:mwargers@mozilla.com Martijn Wargers] (irc: mw22) |- | ''...") |
|||
Line 20: | Line 20: | ||
|- | |- | ||
| '''API Tracking Bugs''' | | '''API Tracking Bugs''' | ||
| {{bug| 437948}} | | {{bug|437948}} | ||
|- | |- | ||
| '''API Status''' | | '''API Status''' |
Revision as of 20:36, 30 July 2012
Geolocation API Test Plan
Summary
Lead | Martijn Wargers (irc: mw22) |
Contributors | Xiao Meng Wei (irc: xwei) |
API Description | Allows access to the geographical location of the device |
API Developer | Doug Turner |
API Project Page | Geolocation |
API Tracking Bugs | bug 437948 |
API Status | Delivered and ready for test |
Scope
This test plan covers functional testing of the Geolocation API as delivered for Boot2Gecko. It does not attempt to cover performance, security, or other kinds of testing at this time.
Strategy
- There are already mochitests for the Geolocation API here: http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/
- UI testing related to the Geolocation API - tbd - john Hammink, Matt Brandt
- 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
- Private browsing mode
- related prefs: ?
API
Geolocation API is defined as part of the nsIDOMNavigator interface. It includes:
- getCurrentPosition() to get a single position
- watchPosition() to get an update when the position has changed
- clearWatch() to clear the listener that is calling when watchPosition()
devmo article
Geolocation API Specification
Methods
- void getCurrentPosition(in nsIDOMGeoPositionCallback successCallback,
[optional] in nsIDOMGeoPositionErrorCallback errorCallback, /* GeoPositionOptions */ [optional] in jsval options);
- long watchPosition(in nsIDOMGeoPositionCallback successCallback,
[optional] in nsIDOMGeoPositionErrorCallback errorCallback, /* GeoPositionOptions */ [optional] in jsval options);
- void clearWatch(in long watchId);
Tests
Marionette/JS
Basic Positive Tests
mochitest-plain
- http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/geolocation/
- http://mxr.mozilla.org/mozilla-central/source/dom/tests/mochitest/chrome/test_geolocation.xul
Sanity Tests
Basic Negative Tests
Test App Design
Basic test application can be found here.
URLS
- http://mozqa.com/data/firefox/geolocation/
- http://www.w3.org/TR/geolocation-API/
- https://developer.mozilla.org/en/Using_geolocation
This page is based on the WebAPI Test Plan Template