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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/credentialmanager/passwordcredential-redirect.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 <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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698