OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script> | 2 <script> |
3 if (window.testRunner) | 3 if (window.testRunner) |
4 testRunner.addMockCredentialManagerResponse("id", "name", "", "password"); | 4 testRunner.setMockCredentialManagerResponse("id", "name", "", "password"); |
5 | 5 |
6 navigator.credentials.get({ 'password': true }) | 6 navigator.credentials.get({ 'password': true }) |
7 .then(c => { | 7 .then(c => { |
8 window.top.postMessage({ | 8 window.top.postMessage({ |
9 "credential": c, | 9 "credential": c, |
10 "exception": null | 10 "exception": null |
11 }, "*"); | 11 }, "*"); |
12 }) | 12 }) |
13 .catch(omg => { | 13 .catch(omg => { |
14 window.top.postMessage({ | 14 window.top.postMessage({ |
(...skipping 23 matching lines...) Expand all Loading... |
38 "exception": null | 38 "exception": null |
39 }, "*"); | 39 }, "*"); |
40 }) | 40 }) |
41 .catch(omg => { | 41 .catch(omg => { |
42 window.top.postMessage({ | 42 window.top.postMessage({ |
43 "credential": null, | 43 "credential": null, |
44 "exception": omg.name | 44 "exception": omg.name |
45 }, "*"); | 45 }, "*"); |
46 }); | 46 }); |
47 </script> | 47 </script> |
OLD | NEW |