| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <script src="/resources/testharness.js"></script> | 2 <script src="/resources/testharness.js"></script> |
| 3 <script src="/resources/testharnessreport.js"></script> | 3 <script src="/resources/testharnessreport.js"></script> |
| 4 <script src="/resources/testharness-helpers.js"></script> |
| 4 <script src="../resources/fetch-test-helpers.js"></script> | 5 <script src="../resources/fetch-test-helpers.js"></script> |
| 5 <script> | 6 <script> |
| 6 sequential_promise_test(function(t) { | 7 sequential_promise_test(function(t) { |
| 7 return fetch('../resources/doctype.html') | 8 return fetch('../resources/doctype.html') |
| 8 .then(function() {}, t.unreached_func('must resolve')); | 9 .then(function() {}, t.unreached_func('must resolve')); |
| 9 }, 'fetch() with 200 should not output error messages'); | 10 }, 'fetch() with 200 should not output error messages'); |
| 10 | 11 |
| 11 sequential_promise_test(function(t) { | 12 sequential_promise_test(function(t) { |
| 12 return fetch('../resources/not-found.html') | 13 return fetch('../resources/not-found.html') |
| 13 .then(function() {}, t.unreached_func('must resolve')); | 14 .then(function() {}, t.unreached_func('must resolve')); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 34 .then(t.unreached_func('must reject'), function() {}); | 35 .then(t.unreached_func('must reject'), function() {}); |
| 35 }, 'A didFailAccessControlCheck() error should output an error message'); | 36 }, 'A didFailAccessControlCheck() error should output an error message'); |
| 36 | 37 |
| 37 // A didFailRedirectCheck() error | 38 // A didFailRedirectCheck() error |
| 38 // that has NO console error messages from outside modules/fetch, | 39 // that has NO console error messages from outside modules/fetch, |
| 39 // and thus we OUTPUT a message from modules/fetch. | 40 // and thus we OUTPUT a message from modules/fetch. |
| 40 sequential_promise_test(function(t) { | 41 sequential_promise_test(function(t) { |
| 41 return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count=
100&ACAOrigin=*') | 42 return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count=
100&ACAOrigin=*') |
| 42 .then(t.unreached_func('must reject'), function() {}); | 43 .then(t.unreached_func('must reject'), function() {}); |
| 43 }, 'A didFailRedirectCheck() error should output an error message'); | 44 }, 'A didFailRedirectCheck() error should output an error message'); |
| 44 | |
| 45 sequential_promise_test_done(); | |
| 46 </script> | 45 </script> |
| OLD | NEW |