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

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

Issue 1880393002: CREDENTIAL: Implement 'SiteBoundCredential'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback. Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/credentialmanager/idl.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 }
11 11
12 function stubRejectionChecker(reason) { 12 function stubRejectionChecker(reason) {
13 assert_unreached("get() should not reject, but did: " + reason.name); 13 assert_unreached("get(...) should not reject, but did: " + reason.name);
14 } 14 }
15 15
16 (function() { 16 (function() {
17 var t = async_test("Verify the basics of get()."); 17 var t = async_test("Verify the basics of get().");
18 t.step(function () { 18 t.step(function () {
19 navigator.credentials.get().then( 19 navigator.credentials.get().then(
20 t.step_func(stubResolverUndefinedChecker.bind(t)), 20 t.unreached_func(),
21 t.step_func(stubRejectionChecker.bind(t))); 21 t.step_func(t.done.bind(t)));
philipj_slow 2016/04/25 11:54:21 Looks a bit odd, would t.step_func_done() suffice?
Mike West 2016/04/25 13:03:31 Yes, it would. Thanks!
22 }); 22 });
23 }()); 23 }());
24 24
25 (function() { 25 (function() {
26 var t = async_test("Verify the basics of get({})."); 26 var t = async_test("Verify the basics of get({}).");
27 t.step(function () { 27 t.step(function () {
28 navigator.credentials.get({}).then( 28 navigator.credentials.get({}).then(
29 t.step_func(stubResolverUndefinedChecker.bind(t)), 29 t.step_func(stubResolverUndefinedChecker.bind(t)),
30 t.step_func(stubRejectionChecker.bind(t))); 30 t.step_func(stubRejectionChecker.bind(t)));
31 }); 31 });
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 if (window.testRunner) 135 if (window.testRunner)
136 testRunner.addMockCredentialManagerResponse(id, name, icon, password ); 136 testRunner.addMockCredentialManagerResponse(id, name, icon, password );
137 navigator.credentials.get({ 137 navigator.credentials.get({
138 password: true 138 password: true
139 }).then( 139 }).then(
140 t.step_func(stubResolverChecker.bind(t)), 140 t.step_func(stubResolverChecker.bind(t)),
141 t.step_func(stubRejectionChecker.bind(t))); 141 t.step_func(stubRejectionChecker.bind(t)));
142 }); 142 });
143 }()); 143 }());
144 </script> 144 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/credentialmanager/idl.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698