summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/bluetooth/requestLEScan/reject_opaque_origin.https.html
blob: 272c5aa760cf7f5bedc24e2d652d68164ab353d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<!DOCTYPE html>

<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
  'use strict';

  promise_test(async (t) => {
    await promise_rejects_dom(
        t, 'SecurityError', navigator.bluetooth.requestLEScan(),
        'requestLEScan() should throw a SecurityError DOMException when called from a context where the top-level document has an opaque origin.');
  }, 'Calls to Bluetooth APIs from an origin with opaque top origin get blocked.');
</script>