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

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

Issue 1317043003: CREDENTIAL: Add 'PasswordCredential::toFormData()' (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@opaque-formdata
Patch Set: webexposed Created 5 years, 3 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/passwordcredential-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: get() basics.</title> 2 <title>Credential Manager: get() 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 src="/serviceworker/resources/interfaces.js"></script> 5 <script src="/serviceworker/resources/interfaces.js"></script>
6 <script> 6 <script>
7 function stubResolverUndefinedChecker(c) { 7 function stubResolverUndefinedChecker(c) {
8 assert_equals(c, undefined); 8 assert_equals(c, undefined);
9 this.done(); 9 this.done();
10 } 10 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 (function () { 79 (function () {
80 var id = "id"; 80 var id = "id";
81 var name = "name"; 81 var name = "name";
82 var icon = "http://example.com/"; 82 var icon = "http://example.com/";
83 var password = "pencil"; 83 var password = "pencil";
84 84
85 function stubResolverChecker(c) { 85 function stubResolverChecker(c) {
86 verify_interface('PasswordCredential', c, { 86 verify_interface('PasswordCredential', c, {
87 id: 'string', 87 id: 'string',
88 name: 'string', 88 name: 'string',
89 iconURL: 'string', 89 iconURL: 'string'
90 password: 'string'
91 }); 90 });
92 91
93 assert_equals(c.id, id); 92 assert_equals(c.id, id);
94 assert_equals(c.name, name); 93 assert_equals(c.name, name);
95 assert_equals(c.iconURL, icon); 94 assert_equals(c.iconURL, icon);
96 assert_equals(c.password, password); 95 assert_true(c.toFormData() instanceof FormData);
96
97 this.done(); 97 this.done();
98 } 98 }
99 99
100 var t = async_test("Verify that the mock returns the values we give it."); 100 var t = async_test("Verify that the mock returns the values we give it.");
101 t.step(function() { 101 t.step(function() {
102 if (window.testRunner) 102 if (window.testRunner)
103 testRunner.addMockCredentialManagerResponse(id, name, icon, password ); 103 testRunner.addMockCredentialManagerResponse(id, name, icon, password );
104 navigator.credentials.get().then( 104 navigator.credentials.get().then(
105 t.step_func(stubResolverChecker.bind(t)), 105 t.step_func(stubResolverChecker.bind(t)),
106 t.step_func(stubRejectionChecker.bind(t))); 106 t.step_func(stubRejectionChecker.bind(t)));
107 }); 107 });
108 }()); 108 }());
109 </script> 109 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/credentialmanager/passwordcredential-basics.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698