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

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

Issue 2749153005: Make CredentialsContainer#get argument options optional to match the spec (Closed)
Patch Set: Update credentialmanager/idl.html tests after the idl change Created 3 years, 9 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 add_completion_callback(() => { 16 add_completion_callback(() => {
17 if (window.testRunner) 17 if (window.testRunner)
18 window.testRunner.clearMockCredentialManagerResponse(); 18 window.testRunner.clearMockCredentialManagerResponse();
19 }); 19 });
20 20
21 (function() { 21 (function() {
22 var t = async_test("navigator.credentials.get() (no argument) should throw." ); 22 var t = async_test("navigator.credentials.get() with no argument.");
23 t.step(function () { 23 t.step(function () {
24 navigator.credentials.get().then( 24 navigator.credentials.get().then(
25 t.unreached_func(), 25 t.step_func(stubResolverUndefinedChecker.bind(t)),
26 t.step_func_done()); 26 t.step_func(stubRejectionChecker.bind(t)));
27 }); 27 });
28 }()); 28 }());
29 29
30 (function() { 30 (function() {
31 var t = async_test("navigator.credentials.get({})."); 31 var t = async_test("navigator.credentials.get({}).");
32 t.step(function () { 32 t.step(function () {
33 navigator.credentials.get({}).then( 33 navigator.credentials.get({}).then(
34 t.step_func(stubResolverUndefinedChecker.bind(t)), 34 t.step_func(stubResolverUndefinedChecker.bind(t)),
35 t.step_func(stubRejectionChecker.bind(t))); 35 t.step_func(stubRejectionChecker.bind(t)));
36 }); 36 });
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 if (window.testRunner) 140 if (window.testRunner)
141 testRunner.setMockCredentialManagerResponse(id, name, icon, password ); 141 testRunner.setMockCredentialManagerResponse(id, name, icon, password );
142 navigator.credentials.get({ 142 navigator.credentials.get({
143 password: true 143 password: true
144 }).then( 144 }).then(
145 t.step_func(stubResolverChecker.bind(t)), 145 t.step_func(stubResolverChecker.bind(t)),
146 t.step_func(stubRejectionChecker.bind(t))); 146 t.step_func(stubRejectionChecker.bind(t)));
147 }); 147 });
148 }()); 148 }());
149 </script> 149 </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