Index: third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-basics.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-basics.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-basics.html |
index 1d5b51dbc3f8601acfd84bac21e7418bd95943b4..0270a9f4c782d7102ce01a2e252c2f2a4e79c4ef 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-basics.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/credentialscontainer-get-basics.html |
@@ -13,8 +13,13 @@ function stubRejectionChecker(reason) { |
assert_unreached("get(...) should not reject, but did: " + reason.name); |
} |
+add_completion_callback(() => { |
+ if (window.testRunner) |
+ window.testRunner.clearMockCredentialManagerResponse(); |
+}); |
+ |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() (no argument) should throw."); |
t.step(function () { |
navigator.credentials.get().then( |
t.unreached_func(), |
@@ -23,7 +28,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get({})."); |
+ var t = async_test("navigator.credentials.get({})."); |
t.step(function () { |
navigator.credentials.get({}).then( |
t.step_func(stubResolverUndefinedChecker.bind(t)), |
@@ -32,7 +37,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with a valid options including FederatedCredentialRequestOptions."); |
t.step(function () { |
navigator.credentials.get({ |
federated: { |
@@ -45,7 +50,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with a valid options including password and unmediated."); |
t.step(function () { |
navigator.credentials.get({ |
password: true, |
@@ -57,7 +62,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with a valid options including federated and unmediated."); |
t.step(function () { |
navigator.credentials.get({ |
federated: { |
@@ -71,7 +76,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with a valid options including federated, password and unmediated."); |
t.step(function () { |
navigator.credentials.get({ |
password: true, |
@@ -86,7 +91,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with a valid options including unmediated."); |
t.step(function () { |
navigator.credentials.get({ |
unmediated: true |
@@ -97,7 +102,7 @@ function stubRejectionChecker(reason) { |
}()); |
(function() { |
- var t = async_test("Verify the basics of get()."); |
+ var t = async_test("navigator.credentials.get() with an options including an unknown attribute."); |
t.step(function () { |
navigator.credentials.get({ |
notValid: 'yay!' |
@@ -133,12 +138,12 @@ function stubRejectionChecker(reason) { |
var t = async_test("Verify that the mock returns the values we give it."); |
t.step(function() { |
if (window.testRunner) |
- testRunner.addMockCredentialManagerResponse(id, name, icon, password); |
+ testRunner.setMockCredentialManagerResponse(id, name, icon, password); |
navigator.credentials.get({ |
- password: true |
+ password: true |
}).then( |
t.step_func(stubResolverChecker.bind(t)), |
t.step_func(stubRejectionChecker.bind(t))); |
- }); |
+ }); |
}()); |
</script> |