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

<body>
<script>
(async () => {
  const [permission_geolocation_key] = parseKeylist();
  const result = await new Promise(resolve => {
    navigator.geolocation.getCurrentPosition(
        () => resolve('granted'), () => resolve('denied'));
  });
  writeValueToServer(permission_geolocation_key, `result: ${result}`);
})();
</script>
</body>