| <!DOCTYPE html> |
| <script> |
| if (window.testRunner) |
| testRunner.setMockCredentialManagerResponse("id", "name", "", "password"); |
| |
| navigator.credentials.get({ 'password': true }) |
| .then(c => { |
| window.top.postMessage({ |
| "credential": c, |
| "exception": null |
| }, "*"); |
| }) |
| .catch(omg => { |
| window.top.postMessage({ |
| "credential": null, |
| "exception": omg.name |
| }, "*"); |
| }); |
| |
| navigator.credentials.store(new PasswordCredential({'id': 'name', 'password': 'password' })) |
| .then(c => { |
| window.top.postMessage({ |
| "credential": c, |
| "exception": null |
| }, "*"); |
| }) |
| .catch(omg => { |
| window.top.postMessage({ |
| "credential": null, |
| "exception": omg.name |
| }, "*"); |
| }); |
| |
| navigator.credentials.preventSilentAccess() |
| .then(c => { |
| window.top.postMessage({ |
| "credential": c, |
| "exception": null |
| }, "*"); |
| }) |
| .catch(omg => { |
| window.top.postMessage({ |
| "credential": null, |
| "exception": omg.name |
| }, "*"); |
| }); |
| </script> |