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 <script> | 5 <script> |
7 var c = new PasswordCredential({ | 6 var c = new PasswordCredential({ |
8 id: 'id', | 7 id: 'id', |
9 password: 'pencil', | 8 password: 'pencil', |
10 name: 'name', | 9 name: 'name', |
11 iconURL: 'https://example.com/icon.png' | 10 iconURL: 'https://example.com/icon.png' |
12 }); | 11 }); |
13 | 12 |
14 promise_test(function() { | 13 promise_test(function() { |
15 return fetch("./resources/redirect-to-echo-post.php", { credentials: c, meth
od: "POST" }) | 14 return fetch("./resources/redirect-to-echo-post.php", { credentials: c, meth
od: "POST" }) |
(...skipping 10 matching lines...) Expand all Loading... |
26 return fetch("./resources/redirect-to-echo-post.php?origin=http://example.te
st:8000", { credentials: c, method: "POST" }) | 25 return fetch("./resources/redirect-to-echo-post.php?origin=http://example.te
st:8000", { credentials: c, method: "POST" }) |
27 .then(resp => { | 26 .then(resp => { |
28 assert_equals(resp.url, 'http://127.0.0.1:8000/credentialmanager/res
ources/redirect-to-echo-post.php?origin=http://example.test:8000'); | 27 assert_equals(resp.url, 'http://127.0.0.1:8000/credentialmanager/res
ources/redirect-to-echo-post.php?origin=http://example.test:8000'); |
29 assert_equals(resp.type, 'opaqueredirect'); | 28 assert_equals(resp.type, 'opaqueredirect'); |
30 assert_equals(resp.status, 0); | 29 assert_equals(resp.status, 0); |
31 return resp.text() | 30 return resp.text() |
32 }) | 31 }) |
33 .then(t => assert_equals(t, '')); | 32 .then(t => assert_equals(t, '')); |
34 }, "Cross-origin redirect"); | 33 }, "Cross-origin redirect"); |
35 </script> | 34 </script> |
OLD | NEW |