| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script> |
| 3 if (window.testRunner) |
| 4 testRunner.addMockCredentialManagerResponse("id", "name", "", "password"); |
| 5 |
| 6 navigator.credentials.get({ 'password': true }) |
| 7 .then(c => { |
| 8 window.top.postMessage({ |
| 9 "credential": c, |
| 10 "exception": null |
| 11 }, "*"); |
| 12 }) |
| 13 .catch(omg => { |
| 14 window.top.postMessage({ |
| 15 "credential": null, |
| 16 "exception": omg.name |
| 17 }, "*"); |
| 18 }); |
| 19 |
| 20 navigator.credentials.store(new PasswordCredential({'id': 'name', 'password': 'p
assword' })) |
| 21 .then(c => { |
| 22 window.top.postMessage({ |
| 23 "credential": c, |
| 24 "exception": null |
| 25 }, "*"); |
| 26 }) |
| 27 .catch(omg => { |
| 28 window.top.postMessage({ |
| 29 "credential": null, |
| 30 "exception": omg.name |
| 31 }, "*"); |
| 32 }); |
| 33 |
| 34 navigator.credentials.requireUserMediation() |
| 35 .then(c => { |
| 36 window.top.postMessage({ |
| 37 "credential": c, |
| 38 "exception": null |
| 39 }, "*"); |
| 40 }) |
| 41 .catch(omg => { |
| 42 window.top.postMessage({ |
| 43 "credential": null, |
| 44 "exception": omg.name |
| 45 }, "*"); |
| 46 }); |
| 47 </script> |
| OLD | NEW |