summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/credential-management/idlharness.https.window.js
blob: 26d7c493b045399871fa9b941e0e5a03208d2454 (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
29
30
31
32
33
34
35
36
37
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
// META: timeout=long

// https://w3c.github.io/webappsec-credential-management/

'use strict';

idl_test(
  ['credential-management'],
  ['html', 'dom'],
  idl_array => {
    idl_array.add_objects({
      CredentialsContainer: ['navigator.credentials'],
      PasswordCredential: ['passwordCredential'],
      FederatedCredential: ['federatedCredential'],
    });

    try {
      self.passwordCredential = new PasswordCredential({
        id: "id",
        password: "pencil",
        iconURL: "https://example.com/",
        name: "name"
      });
    } catch (e) {}

    try {
      self.federatedCredential = new FederatedCredential({
        id: "id",
        provider: "https://example.com",
        iconURL: "https://example.com/",
        name: "name"
      });
    } catch (e) {}
  }
)