mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Update web-platform-tests to revision 8a2ceb5f18911302b7a5c1cd2791f4ab50ad4326
This commit is contained in:
parent
462c272380
commit
1f531f66ea
5377 changed files with 174916 additions and 84369 deletions
|
@ -72,6 +72,40 @@ promise_test(function(t) {
|
|||
navigator.credentials.create({federated: "bogus federated data"}));
|
||||
}, "navigator.credentials.create() with bogus federated data");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, new TypeError(),
|
||||
navigator.credentials.create({publicKey: "bogus publicKey data"}));
|
||||
}, "navigator.credentials.create() with bogus publicKey data");
|
||||
|
||||
promise_test(function(t) {
|
||||
var publicKey = {
|
||||
challenge: new TextEncoder().encode("climb a mountain"),
|
||||
rp: {
|
||||
id: "1098237235409872",
|
||||
name: "Acme"
|
||||
},
|
||||
|
||||
user: {
|
||||
id: "1098237235409872",
|
||||
name: "avery.a.jones@example.com",
|
||||
displayName: "Avery A. Jones",
|
||||
icon: "https://pics.acme.com/00/p/aBjjjpqPb.png"
|
||||
},
|
||||
|
||||
parameters: [{
|
||||
type: "public-key",
|
||||
algorithm: "ES256",
|
||||
},],
|
||||
|
||||
timeout: 60000, // 1 minute
|
||||
excludeList: [], // No excludeList
|
||||
};
|
||||
|
||||
return navigator.credentials.create({publicKey}).then(r => {
|
||||
assert_true(r instanceof PublicKeyCredential);
|
||||
});
|
||||
}, "navigator.credentials.create() returns PublicKeyCredential");
|
||||
|
||||
promise_test(function(t) {
|
||||
var credential_data = {
|
||||
id: 'id',
|
||||
|
@ -98,6 +132,31 @@ promise_test(function(t) {
|
|||
}));
|
||||
}, "navigator.credentials.create() with bogus password and federated data");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, new TypeError(),
|
||||
navigator.credentials.create({
|
||||
federated: "bogus federated data",
|
||||
publicKey: "bogus publicKey data",
|
||||
}));
|
||||
}, "navigator.credentials.create() with bogus federated and publicKey data");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, new TypeError(),
|
||||
navigator.credentials.create({
|
||||
password: "bogus password data",
|
||||
publicKey: "bogus publicKey data",
|
||||
}));
|
||||
}, "navigator.credentials.create() with bogus password and publicKey data");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, new TypeError(),
|
||||
navigator.credentials.create({
|
||||
password: "bogus password data",
|
||||
federated: "bogus federated data",
|
||||
publicKey: "bogus publicKey data",
|
||||
}));
|
||||
}, "navigator.credentials.create() with bogus password, federated, and publicKey data");
|
||||
|
||||
promise_test(function(t) {
|
||||
return promise_rejects(t, "NotSupportedError",
|
||||
navigator.credentials.create({bogus_key: "bogus data"}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue