B2G/QA/WebAPI Test Plan/Screen Orientation

From MozillaWiki
< B2G‎ | QA‎ | WebAPI Test Plan
Revision as of 01:55, 25 May 2012 by Gmealer (talk | contribs) (Created page with "=Boot2Gecko Screen Orientation API Test Plan= == Summary == {| class="fullwidth-table" |- | style="width:20%" | '''Lead''' | [mailto:gmealer@mozilla.com Geo Mealer] (irc: geo...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Boot2Gecko Screen Orientation API Test Plan

Summary

Lead Geo Mealer (irc: geo)
Contributors TBD
Description Get notification when screen orientation changes as well as control which screen orientation a page/app wants.
API Status Delivered and ready for test
API Developer Mounir Lamouri
Project Page Screen Orientation
Tracking Bugs bug 720794, bug 740188, bug 673922

Scope

This test plan covers functional testing of the Screen Orientation API as delivered for Boot2Gecko. It does not attempt to cover performance, security, or other kinds of testing at this time.

Strategy

Screen Orientation can be tested most effectively using QEMU commands to manipulate the virtual orientation of the device, so primary testing will be via Marionette/JS through CI.

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.

API

Screen Orientation API is relatively simple, and is defined as part of the nsIDOMScreen interface.

It includes a basic attribute to get current orientation, methods to lock/unlock orientation to a desired value (for example, for an app that only runs in landscape), and an event to let applications know when an orientation change has occured.

nsIDOMScreen

Attributes

  • read-only DOMString mozOrientation
    (can be landscape-primary, landscape-secondary, portrait-primary, portrait secondary)

Methods

  • boolean mozLockOrientation(in DOMString orientation)
  • void mozUnlockOrientation()

Events

  • onmozorientationchange

Tests

Basic Positive

  • Marionette/JS
    • Group Description
      • Test Description
      • Test Description
  • mochitest-plain
    • Group Description
      • Test Description
      • Test Description

Basic Negative

  • Marionette/JS
    • Group Description
      • Test Description
      • Test Description
  • mochitest-plain
    • Group Description
      • Test Description
      • Test Description

Test App Design

TBD