2 <title>Credential Manager: notifyFailedSignIn() basics.</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
6 function stubResolverChecker(c) {
7 assert_equals(c, undefined, "FIXME: We're currently always returning 'undefined'.");
11 function stubRejectionChecker(reason) {
12 assert_unreached("notifyFailedSignIn() should not reject, but did: " + reason.name);
15 var local = new LocalCredential('id', 'name', 'https://example.com/avatar.png', 'pencil');
16 var federated = new FederatedCredential('id', 'name', 'https://example.com/avatar.png', 'https://federation.net');
18 async_test(function () {
19 navigator.credentials.notifyFailedSignIn(local).then(
20 this.step_func(stubResolverChecker.bind(this)),
21 this.step_func(stubRejectionChecker.bind(this)));
22 }, "Verify the basics of notifyFailedSignIn(): LocalCredential.");
24 async_test(function () {
25 navigator.credentials.notifyFailedSignIn(federated).then(
26 this.step_func(stubResolverChecker.bind(this)),
27 this.step_func(stubRejectionChecker.bind(this)));
28 }, "Verify the basics of notifyFailedSignIn(): FederatedCredential.");