| Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-errors.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-errors.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-errors.html
|
| index 043ae352d61d0798d050486f24e0cb4ca0edb209..347fc413fa6d90d72063b970e1a654354afa5276 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-errors.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-errors.html
|
| @@ -3,29 +3,26 @@
|
| <script src="../resources/testharnessreport.js"></script>
|
| <script src="/serviceworker/resources/interfaces.js"></script>
|
| <script>
|
| -function stubResolverUndefinedChecker(c) {
|
| - assert_equals(c, undefined);
|
| - this.done();
|
| -}
|
| -
|
| -function stubRejectionChecker(reason) {
|
| - assert_unreached("get() should not reject, but did: " + reason.name);
|
| -}
|
| +add_completion_callback(() => {
|
| + if (window.testRunner) {
|
| + // Clear the error value by passing an empty string.
|
| + testRunner.setMockCredentialManagerError("");
|
| + }
|
| +});
|
|
|
| promise_test(function (t) {
|
| if (window.testRunner)
|
| - testRunner.addMockCredentialManagerError("pending");
|
| + testRunner.setMockCredentialManagerError("pending");
|
| return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ password: true }));
|
| });
|
| promise_test(function (t) {
|
| if (window.testRunner)
|
| - testRunner.addMockCredentialManagerError("disabled");
|
| + testRunner.setMockCredentialManagerError("disabled");
|
| return promise_rejects(t, "InvalidStateError", navigator.credentials.get({ password: true }));
|
| });
|
| promise_test(function (t) {
|
| if (window.testRunner)
|
| - testRunner.addMockCredentialManagerError("unknown");
|
| + testRunner.setMockCredentialManagerError("unknown");
|
| return promise_rejects(t, "NotReadableError", navigator.credentials.get({ password: true }));
|
| });
|
| </script>
|
| -
|
|
|