tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_battery_unprivileged.html (663B)


      1 <!DOCTYPE HTML>
      2 <html>
      3 <head>
      4  <title>Test for Battery API</title>
      5  <script src="/tests/SimpleTest/SimpleTest.js"></script>
      6  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
      7 </head>
      8 <body>
      9 <p id="display"></p>
     10 <div id="content" style="display: none">
     11 </div>
     12 <pre id="test">
     13 <script type="application/javascript">
     14 
     15 "use strict";
     16 
     17 /** Test for Battery API */
     18 ok(!("getBattery" in navigator), "navigator.getBattery should not exist for unprivileged web content");
     19 ok(!("battery" in navigator), "navigator.battery should not exist");
     20 ok(!("BatteryManager" in window), "BatteryManager should not exist");
     21 
     22 </script>
     23 </pre>
     24 </body>
     25 </html>