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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-fetch.html

Issue 2865313003: Upstream service worker tests to WPT (Closed)
Patch Set: Re-introduce resource script 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 <title>Credential Manager: PasswordCredential basics.</title> 2 <title>Credential Manager: PasswordCredential basics.</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="../resources/testharnessreport.js"></script>
5 <script src="/serviceworker/resources/interfaces.js"></script>
6 <body> 5 <body>
7 <input type=hidden id=thing value=sekrit> 6 <input type=hidden id=thing value=sekrit>
8 <script> 7 <script>
9 add_completion_callback(() => { 8 add_completion_callback(() => {
10 if (window.testRunner) 9 if (window.testRunner)
11 testRunner.clearMockCredentialManagerResponse(); 10 testRunner.clearMockCredentialManagerResponse();
12 }); 11 });
13 12
14 var c = new PasswordCredential({ 13 var c = new PasswordCredential({
15 id: 'id', 14 id: 'id',
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 return fetch("./resources/echo-post.php", { credentials: c, method: "POST" }) 400 return fetch("./resources/echo-post.php", { credentials: c, method: "POST" })
402 .then(resp => resp.json()) 401 .then(resp => resp.json())
403 .then(j => { 402 .then(j => {
404 assert_equals(j.username, 'id'); 403 assert_equals(j.username, 'id');
405 assert_equals(j.password, 'pencil') 404 assert_equals(j.password, 'pencil')
406 assert_equals(j.csrf_token, 'sekrit') 405 assert_equals(j.csrf_token, 'sekrit')
407 }); 406 });
408 }); 407 });
409 }, 'fetch() after get() with additionalData from DOM'); 408 }, 'fetch() after get() with additionalData from DOM');
410 </script> 409 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698