Update web-platform-tests to revision a46616a5b18e83587ddbbed756c7b96cbb4b015d

This commit is contained in:
Josh Matthews 2017-06-19 19:07:14 -04:00 committed by Ms2ger
parent 3f07cfec7c
commit 578498ba24
4001 changed files with 159517 additions and 30260 deletions

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Battery Test: navigator.getBattery() always return same battery promise</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://www.w3.org/TR/battery-status/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
promise_test(function () {
return navigator.getBattery().then(function (result) {
assert_class_string(result, 'BatteryManager',
'getBattery should return BatteryManager Object.');
});
}, 'navigator.getBattery() shall return BatteryManager as a promise');
test(function () {
assert_equals(navigator.getBattery(), navigator.getBattery());
}, 'navigator.getBattery() shall always return the same promise');
</script>