summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/shared-storage/resources/shared-storage-permissions-policy-helper.html
blob: d87092aad1d2efedf5d4245884e28e159880b2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<!doctype html>
<body>
  <script src="/resources/testharness.js"></script>
  <script src="/resources/testharnessreport.js"></script>
  <script src="/shared-storage/resources/util.js"></script>
  <script>
  'use strict';

  window.onload = async function() {
    if (await AreSharedStorageMethodsAllowedByPermissionsPolicy()) {
      parent.postMessage({ type: 'availability-result', enabled: true }, '*');
      return;
    }

    parent.postMessage({ type: 'availability-result', enabled: false }, '*');
  }
  </script>
</body>