mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
76d382c04f
--HG-- rename : dom/battery/nsIDOMNavigatorBattery.idl => dom/battery/nsINavigatorBattery.idl
29 lines
816 B
HTML
29 lines
816 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<title>Test for Battery API</title>
|
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
</head>
|
|
<body>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
</div>
|
|
<pre id="test">
|
|
<script type="application/javascript">
|
|
|
|
/** Test for Battery API **/
|
|
|
|
ok('battery' in navigator, "navigator.battery should exist");
|
|
|
|
var battery = navigator.battery;
|
|
is(battery.level, 1.0, "Default battery level should be 1.0");
|
|
is(battery.charging, true, "Default charging value should be true");
|
|
is(battery.dischargingTime, Infinity, "Default dischargingTime should be Inifinity");
|
|
is(battery.chargingTime, 0, "Default chargingTime should be 0");
|
|
|
|
</script>
|
|
</pre>
|
|
</body>
|
|
</html>
|