summaryrefslogtreecommitdiffstats
path: root/dom/credentialmanagement/tests/crashtests/bug1691963.html
blob: f7ef34622fae18fdc70620176bb9c42dd3956197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html class="reftest-wait">
<head>
  <script>
    document.addEventListener("DOMContentLoaded", () => {
      const frame = document.createElement("frame");
      document.body.appendChild(frame);
      const { credentials } = frame.contentWindow.navigator;

      let i = 0;
      setInterval(async () => {
        if (i++ > 3) {
          document.documentElement.removeAttribute("class");
        }
        try {
          await credentials.get({
            publicKey: {
              challenge: new Uint8Array(128),
              allowCredentials: [{ type: 'public-key', id: new TextEncoder().encode('FOOBAR'), }],
            },
          });
        } catch (e) {}
        frame.remove();
      }, 1000);
    }, { once: true });
  </script>
</head>
</html>