gecko/dom/battery/test/test_battery_basics.html
Mounir Lamouri e4a26be94c Bug 678694 - (4/7) Dummy BatteryManager DOM code. r=sicking
Returns default values only and doesn't send events.
2011-11-02 16:01:32 +01:00

27 lines
674 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('mozBattery' in navigator, "navigator.mozBattery should exist");
var battery = navigator.mozBattery;
is(battery.level, 1.0, "Default battery level should be 1.0");
is(battery.charging, true, "Default charging value should be true");
</script>
</pre>
</body>
</html>