summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fenced-frame/resources/permission-api-denied-inner.html
blob: 06724ac0615d9a21991f88c9cf0941ce9ae4b1ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<!DOCTYPE html>
<script src="utils.js"></script>
<title>Fenced frame content to report the result of navigator.permissions.query</title>

<body>
  <script>
    (async () => {
      const [permission_key, permission_name] = parseKeylist();
      // Push permission without userVisibleOnly:true is not supported.
      let user_visible_only = permission_name === 'push' ? true : false;
      const result = await navigator.permissions.query({ name: permission_name, userVisibleOnly: user_visible_only });
      writeValueToServer(permission_key, `result: ${result.state}`);
    })();
  </script>
</body>