OLD | NEW |
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 Loading... |
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> |
OLD | NEW |