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

Side by Side Diff: LayoutTests/http/tests/credentialmanager/credentialscontainer-notifyfailedsignin-basics.html

Issue 661973002: Credential Manager: JavaScript arguments make more sense in a different order. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git/+/master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/credentialmanager/credentialscontainer-notifysignedin-basics.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Credential Manager: notifyFailedSignIn() basics.</title> 2 <title>Credential Manager: notifyFailedSignIn() 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, "FIXME: We're currently always returning 'undefi ned'.");
8 this.done(); 8 this.done();
9 } 9 }
10 10
11 function stubRejectionChecker(reason) { 11 function stubRejectionChecker(reason) {
12 assert_unreached("notifyFailedSignIn() should not reject, but did: " + reaso n); 12 assert_unreached("notifyFailedSignIn() should not reject, but did: " + reaso n);
13 } 13 }
14 14
15 var local = new LocalCredential('id', 'name', 'https://example.com/avatar.png', 'pencil'); 15 var local = new LocalCredential('id', 'pencil', 'name', 'https://example.com/ava tar.png');
16 var federated = new FederatedCredential('id', 'name', 'https://example.com/avata r.png', 'https://federation.net'); 16 var federated = new FederatedCredential('id', 'https://federation.net', 'name', 'https://example.com/avatar.png');
17 17
18 async_test(function () { 18 async_test(function () {
19 navigator.credentials.notifyFailedSignIn().then( 19 navigator.credentials.notifyFailedSignIn().then(
20 this.step_func(function () { assert_unreached("notifyFailedSignIn() shou ld reject."); }), 20 this.step_func(function () { assert_unreached("notifyFailedSignIn() shou ld reject."); }),
21 this.step_func(function (reason) { 21 this.step_func(function (reason) {
22 assert_equals(reason.name, "TypeError"); 22 assert_equals(reason.name, "TypeError");
23 this.done(); 23 this.done();
24 })); 24 }));
25 }, "Verify the basics of notifyFailedSignIn(): LocalCredential."); 25 }, "Verify the basics of notifyFailedSignIn(): LocalCredential.");
26 26
27 async_test(function () { 27 async_test(function () {
28 navigator.credentials.notifyFailedSignIn(local).then( 28 navigator.credentials.notifyFailedSignIn(local).then(
29 this.step_func(stubResolverChecker.bind(this)), 29 this.step_func(stubResolverChecker.bind(this)),
30 this.step_func(stubRejectionChecker.bind(this))); 30 this.step_func(stubRejectionChecker.bind(this)));
31 }, "Verify the basics of notifyFailedSignIn(): LocalCredential."); 31 }, "Verify the basics of notifyFailedSignIn(): LocalCredential.");
32 32
33 async_test(function () { 33 async_test(function () {
34 navigator.credentials.notifyFailedSignIn(federated).then( 34 navigator.credentials.notifyFailedSignIn(federated).then(
35 this.step_func(stubResolverChecker.bind(this)), 35 this.step_func(stubResolverChecker.bind(this)),
36 this.step_func(stubRejectionChecker.bind(this))); 36 this.step_func(stubRejectionChecker.bind(this)));
37 }, "Verify the basics of notifyFailedSignIn(): FederatedCredential."); 37 }, "Verify the basics of notifyFailedSignIn(): FederatedCredential.");
38 </script> 38 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/credentialmanager/credentialscontainer-notifysignedin-basics.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698