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

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

Issue 2864493003: Deprecate CredentialRequestOptions.unmediated in favor mediation enum (Closed)
Patch Set: Rebase 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 src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script> 4 <script>
5 add_completion_callback(() => { 5 add_completion_callback(() => {
6 if (window.testRunner) { 6 if (window.testRunner) {
7 // Clear the error value by passing an empty string. 7 // Clear the error value by passing an empty string.
8 testRunner.setMockCredentialManagerError(""); 8 testRunner.setMockCredentialManagerError("");
9 } 9 }
10 }); 10 });
11 11
12 promise_test(function (t) { 12 promise_test(function (t) {
13 if (window.testRunner) 13 if (window.testRunner)
14 testRunner.setMockCredentialManagerError("pending"); 14 testRunner.setMockCredentialManagerError("pending");
15 return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ p assword: true })); 15 return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ p assword: true }));
16 }); 16 });
17 promise_test(function (t) { 17 promise_test(function (t) {
18 if (window.testRunner) 18 if (window.testRunner)
19 testRunner.setMockCredentialManagerError("disabled"); 19 testRunner.setMockCredentialManagerError("disabled");
20 return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ p assword: true })); 20 return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ p assword: true }));
21 }); 21 });
22 promise_test(function (t) { 22 promise_test(function (t) {
23 if (window.testRunner) 23 if (window.testRunner)
24 testRunner.setMockCredentialManagerError("unknown"); 24 testRunner.setMockCredentialManagerError("unknown");
25 return promise_rejects(t, "NotReadableError", navigator.credentials.get({ pa ssword: true })); 25 return promise_rejects(t, "NotReadableError", navigator.credentials.get({ pa ssword: true }));
26 }); 26 });
27 promise_test(function (t) {
28 return promise_rejects(t, new TypeError(), navigator.credentials.get({
29 mediation: "invalid"
30 }));
31 });
27 </script> 32 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698