summaryrefslogtreecommitdiffstats
path: root/dom/battery/test/test_battery_unprivileged.html
blob: 2129aaf6a40f980e2ab22889f80521d2170bf8cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for Battery API</title>
  <script 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">

"use strict";

/** Test for Battery API **/
ok(!("getBattery" in navigator), "navigator.getBattery should not exist for unprivileged web content");
ok(!("battery" in navigator), "navigator.battery should not exist");
ok(!("BatteryManager" in window), "BatteryManager should not exist");

</script>
</pre>
</body>
</html>