Update web-platform-tests to revision 6d85a3b422cab97d032ad3db47cb741ca364185f

This commit is contained in:
WPT Sync Bot 2018-02-08 20:20:17 -05:00
parent cd663ea332
commit b524b7c279
37 changed files with 1446 additions and 178 deletions

View file

@ -11,11 +11,56 @@
standardSetup(function() {
"use strict";
// GetCredentialsTest passing tests
// new GetCredentialsTest().addCredential();
new GetCredentialsTest().addCredential().test();
var credPromise = createCredential();
// GetCredentialsTest with default args
new GetCredentialsTest()
.addCredential(credPromise)
.runTest("passing credentials.get() with default args");
// timeout
new GetCredentialsTest({path: "options.publicKey.timeout", value: undefined})
.addCredential(credPromise)
.runTest("passing credentials.create() with no timeout");
// rpId
new GetCredentialsTest({path: "options.publicKey.rpId", value: undefined})
.addCredential(credPromise)
.runTest("rpId undefined");
new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.host})
.addCredential(credPromise)
.runTest("passing credentials.get() with rpId (host and port)");
new GetCredentialsTest({path: "options.publicKey.rpId", value: window.location.hostname})
.addCredential(credPromise)
.runTest("passing credentials.get() with rpId (hostname)");
// allowCredentials
new GetCredentialsTest({path: "options.publicKey.allowCredentials", value: undefined})
.runTest("no credential specified");
// authnr selection user verification
new GetCredentialsTest({path: "options.publicKey.userVerification", value: undefined})
.addCredential(credPromise)
.runTest("authenticatorSelection userVerification undefined");
new GetCredentialsTest("options.publicKey.userVerification", "preferred")
.addCredential(credPromise)
.runTest("authenticatorSelection userVerification preferred");
new GetCredentialsTest("options.publicKey.userVerification", "discouraged")
.addCredential(credPromise)
.runTest("authenticatorSelection userVerification discouraged");
// good extension values
new GetCredentialsTest({path: "options.publicKey.extensions", value: undefined})
.addCredential(credPromise)
.runTest("extensions undefined");
new GetCredentialsTest("options.publicKey.extensions", {})
.addCredential(credPromise)
.runTest("extensions are empty object");
new GetCredentialsTest("options.publicKey.extensions", {foo: "", bar: "", bat: ""})
.addCredential(credPromise)
.runTest("extensions are dict of empty strings");
});
/* JSHINT */
/* globals standardSetup, GetCredentialsTest */
/* globals standardSetup, GetCredentialsTest, createCredential */
</script>