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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.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/passwordcredential-fetch.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
index 21bd7aa30ac6bbd32a0c41457dde52e98a4c4292..207ab1f543b456d11b6b70d8cf5aedd75a9e25f1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
+++ b/third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html
@@ -6,6 +6,11 @@
<body>
<input type=hidden id=thing value=sekrit>
<script>
+add_completion_callback(() => {
+ if (window.testRunner)
+ testRunner.clearMockCredentialManagerResponse();
+});
+
var c = new PasswordCredential({
id: 'id',
password: 'pencil',
@@ -340,7 +345,7 @@ promise_test(_ => {
var password = "pencil";
if (window.testRunner)
- testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+ testRunner.setMockCredentialManagerResponse(id, name, icon, password);
return navigator.credentials.get({ password: true })
.then(c => {
@@ -360,11 +365,10 @@ promise_test(_ => {
var password = "pencil";
if (window.testRunner)
- testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+ testRunner.setMockCredentialManagerResponse(id, name, icon, password);
return navigator.credentials.get({ password: true })
.then(c => {
-
var fd = new FormData();
fd.append('csrf_token', 'sekrit');
c.additionalData = fd;
@@ -386,7 +390,7 @@ promise_test(_ => {
var password = "pencil";
if (window.testRunner)
- testRunner.addMockCredentialManagerResponse(id, name, icon, password);
+ testRunner.setMockCredentialManagerResponse(id, name, icon, password);
return navigator.credentials.get({ password: true })
.then(c => {

Powered by Google App Engine
This is Rietveld 408576698