Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/resources/iframed-credentialscontainer.html

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: merge Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 testRunner.setMockCredentialManagerResponse("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
(...skipping 13 matching lines...) Expand all
24 "exception": null 24 "exception": null
25 }, "*"); 25 }, "*");
26 }) 26 })
27 .catch(omg => { 27 .catch(omg => {
28 window.top.postMessage({ 28 window.top.postMessage({
29 "credential": null, 29 "credential": null,
30 "exception": omg.name 30 "exception": omg.name
31 }, "*"); 31 }, "*");
32 }); 32 });
33 33
34 navigator.credentials.requireUserMediation() 34 navigator.credentials.preventSilentAccess()
35 .then(c => { 35 .then(c => {
36 window.top.postMessage({ 36 window.top.postMessage({
37 "credential": c, 37 "credential": c,
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698