tor-browser

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

battery_status.https.html (639B)


      1 <!DOCTYPE html>
      2 <title>Battery status API test</title>
      3 <script src="/resources/testharness.js"></script>
      4 <script src="/resources/testharnessreport.js"></script>
      5 <script src="/common/utils.js"></script>
      6 <script src="resources/utils.js"></script>
      7 
      8 <body>
      9 <script>
     10 promise_test(async () => {
     11  const uuid = token();
     12  const frame = attachFencedFrame(
     13    generateURL(`resources/get_battery.html`, [uuid]));
     14  const result = await nextValueFromServer(uuid);
     15  assert_equals(result, "NotAllowedError",
     16                "battery status API should cause exception");
     17 }, 'battery status should not be read in the fenced frame.');
     18 </script>
     19 </body>