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

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

Issue 2373503003: Add clean up logic to navigator.credentials layout tests (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698