OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <title>Credential Manager: requireUserMediation() basics.</title> | 2 <title>Credential Manager: preventSilentAccess() basics.</title> |
3 <script src="../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
5 <script> | 5 <script> |
6 function stubResolverChecker(c) { | 6 function stubResolverChecker(c) { |
7 assert_equals(c, undefined, "FIXME: We're currently always returning 'undefi
ned'."); | 7 assert_equals(c, undefined); |
8 this.done(); | 8 this.done(); |
9 } | 9 } |
10 | 10 |
11 function stubRejectionChecker(reason) { | 11 function stubRejectionChecker(reason) { |
12 assert_unreached("requireUserMediation() should not reject, but did: " + rea
son.name); | 12 assert_unreached("preventSilentAccess() should not reject, but did: " + reas
on.name); |
13 } | 13 } |
14 | 14 |
15 async_test(function () { | 15 async_test(function () { |
16 navigator.credentials.requireUserMediation().then( | 16 navigator.credentials.preventSilentAccess().then( |
17 this.step_func(stubResolverChecker.bind(this)), | 17 this.step_func(stubResolverChecker.bind(this)), |
18 this.step_func(stubRejectionChecker.bind(this))); | 18 this.step_func(stubRejectionChecker.bind(this))); |
19 }, "Verify the basics of requireUserMediation()"); | 19 }, "Verify the basics of preventSilentAccess()"); |
20 </script> | 20 </script> |
OLD | NEW |