Battery Status API: All Results

Test files: 9; Total subtests: 51

Test Files

  1. /battery-status/battery-interface-idlharness.html
  2. /battery-status/battery-promise-iframe.html
  3. /battery-status/battery-promise-window.html
  4. /battery-status/battery-promise.html
  5. /battery-status/battery-charging-manual.html
  6. /battery-status/battery-discharging-manual.html
  7. /battery-status/battery-full-manual.html
  8. /battery-status/battery-plugging-in-manual.html
  9. /battery-status/battery-unplugging-manual.html
TestChrome Beta 52 for AndroidFirefox Nightly 49 for AndroidChrome Beta 52 for WindowsFirefox Night 49 for Windows
/battery-status/battery-interface-idlharness.htmlOKOKOKOK
Battery test: IDLPASSPASSPASSPASS
Navigator interface: operation getBattery()FAILPASSFAILPASS
Navigator must be primary interface of navigatorPASSPASSPASSPASS
Stringification of navigatorPASSPASSPASSPASS
Navigator interface: navigator must inherit property "getBattery" with the proper type (0)PASSPASSPASSPASS
BatteryManager interface: existence and properties of interface objectPASSPASSPASSPASS
BatteryManager interface object lengthPASSPASSPASSPASS
BatteryManager interface object namePASSPASSPASSPASS
BatteryManager interface: existence and properties of interface prototype objectFAILPASSFAILPASS
BatteryManager interface: existence and properties of interface prototype object's "constructor" propertyPASSPASSPASSPASS
BatteryManager interface: attribute chargingPASSPASSPASSPASS
BatteryManager interface: attribute chargingTimePASSPASSPASSPASS
BatteryManager interface: attribute dischargingTimePASSPASSPASSPASS
BatteryManager interface: attribute levelPASSPASSPASSPASS
BatteryManager interface: attribute onchargingchangePASSPASSPASSPASS
BatteryManager interface: attribute onchargingtimechangePASSPASSPASSPASS
BatteryManager interface: attribute ondischargingtimechangePASSPASSPASSPASS
BatteryManager interface: attribute onlevelchangePASSPASSPASSPASS
BatteryManager must be primary interface of managerPASSPASSPASSPASS
Stringification of managerPASSPASSPASSPASS
BatteryManager interface: manager must inherit property "charging" with the proper type (0)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "chargingTime" with the proper type (1)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "dischargingTime" with the proper type (2)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "level" with the proper type (3)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "onchargingchange" with the proper type (4)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "onchargingtimechange" with the proper type (5)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "ondischargingtimechange" with the proper type (6)PASSPASSPASSPASS
BatteryManager interface: manager must inherit property "onlevelchange" with the proper type (7)PASSPASSPASSPASS
EventTarget interface: manager must inherit property "addEventListener" with the proper type (0)PASSPASSPASSPASS
EventTarget interface: calling addEventListener(DOMString,EventListener,boolean) on manager with too few arguments must throw TypeErrorPASSPASSPASSPASS
EventTarget interface: manager must inherit property "removeEventListener" with the proper type (1)PASSPASSPASSPASS
EventTarget interface: calling removeEventListener(DOMString,EventListener,boolean) on manager with too few arguments must throw TypeErrorPASSPASSPASSPASS
EventTarget interface: manager must inherit property "dispatchEvent" with the proper type (2)PASSPASSPASSPASS
EventTarget interface: calling dispatchEvent(Event) on manager with too few arguments must throw TypeErrorPASSPASSPASSPASS
/battery-status/battery-promise-iframe.htmlOKOKOKOK
iframe has a different Navigator object thus getting another battery promisePASSPASSPASSPASS
setting src of an iframe with initial about:blank makes same Navigator object and battery promiseFAILPASSFAILPASS
setting src of an iframe with initial frame makes its Navigator object vary thus getting another battery promisePASSPASSPASSPASS
/battery-status/battery-promise-window.htmlOKOKOKOK
window.open() makes a different Navigator object thus getting another battery promisePASSPASSPASSPASS
/battery-status/battery-promise.htmlOKOKOKOK
navigator.getBattery() shall return BatteryManager as a promisePASSPASSPASSPASS
navigator.getBattery() shall always return the same promisePASSPASSPASSPASS
/battery-status/battery-charging-manual.htmlOKOKOKOK
Battery Test: battery neither empty or full, charger plugged inPASSPASSPASSPASS
/battery-status/battery-discharging-manual.htmlOKOKOKOK
Battery Test: battery neither empty or full, charger unplugged inPASSPASSPASSPASS
/battery-status/battery-full-manual.htmlOKOKOKOK
Battery Test: battery full, charger plugged inPASSPASSPASSPASS
/battery-status/battery-plugging-in-manual.htmlOKOKOKOK
When the device is plugged in and its charging state is updated, must set the charging attribute's value to true and fire a chargingchange event.PASSPASSPASSPASS
When the device is plugged in and its charging time is updated, must set the chargingTime attribute's value and fire a chargingtimechange event.FAILPASSPASSPASS
When the device is plugged in and its discharging time is updated, must set the dischargingTime attribute's value to Infinity and fire a dischargingtimechange event.FAILPASSPASSPASS
When the device is plugged in and the battery level is updated, must set the level attribute's value and fire a levelchange event.PASSPASSPASSPASS
/battery-status/battery-unplugging-manual.htmlOKOKOKOK
When the device is unplugged in and its charging state is updated, must set the charging attribute's value to false and fire a chargingchange event.PASSPASSPASSPASS
When the device is unplugged in and its charging time is updated, must set the chargingTime attribute's value to Infinity and fire a chargingtimechange event.FAILPASSPASSPASS
When the device is unplugged in and its discharging time is updated, must set the dischargingTime attribute's value and fire a dischargingtimechange event.FAILPASSPASSPASS
When the device is plugged in and the battery level is updated, must set the level attribute's value and fire a levelchange event.PASSPASSPASSPASS

Failure analysis:

  1. /battery-status/battery-interface-idlharness.html:
    Chrome has 2 failures which are not specific to Battery Status API:
    1. the first due to throwing instead of rejecting on promise returning methods (in this case, getBattery())
    2. the second due to a general bug of Chrome with WebIDL, see chromium issue 239915
  2. /battery-status/battery-promise-iframe.html:
    The failure have nothing to do with the implementation of battery-status, it is an known issue in Chrome that it is not match the HTML spec in various way while handling of initial about:blank.
  3. /battery-status/battery-plugging-in-manual.html
    /battery-status/battery-unplugging-manual.html:
    due to Chrome for Android doesn't support (dis)chargingTime, see chromium issue 401553