Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!doctype html> | |
| 2 <script src="/resources/testharness.js"></script> | |
| 3 <script src="/resources/testharnessreport.js"></script> | |
| 4 <script src="../resources/fetch-test-helpers.js"></script> | |
| 5 <script> | |
| 6 sequential_promise_test(function(t) { | |
| 7 return fetch('../resources/doctype.html') | |
| 8 .then(function() {}, t.unreached_func('must resolve')); | |
| 9 }, 'fetch() with 200 should not output error messages'); | |
| 10 | |
| 11 sequential_promise_test(function(t) { | |
| 12 return fetch('../resources/not-found.html') | |
| 13 .then(function() {}, t.unreached_func('must resolve')); | |
| 14 }, 'fetch() with 404 should not output error messages'); | |
| 15 | |
| 16 // Two didFail() errors that have console error messages from outside | |
| 17 // modules/fetch, and thus we don't need messages from modules/fetch. | |
| 18 sequential_promise_test(function(t) { | |
| 19 return fetch('../resources/redirect-loop.php?Count=100') | |
| 20 .then(t.unreached_func('must reject'), function() {}); | |
| 21 }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages'); | |
| 22 | |
| 23 sequential_promise_test(function(t) { | |
| 24 return fetch('../resources/slow-failure.cgi') | |
| 25 .then(function() {}, t.unreached_func('must resolve')); | |
| 26 }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages'); | |
| 27 | |
| 28 // A didFailAccessControlCheck() error that has no console error messages from | |
| 29 // outside modules/fetch, and thus we don't need messages from modules/fetch. | |
|
yhirano
2015/06/18 08:35:53
Is this comment correct?
hiroshige
2015/06/18 08:40:46
Oh, corrected.
| |
| 30 sequential_promise_test(function(t) { | |
| 31 return fetch('http://localhost:8000/fetch/resources/doctype.html') | |
| 32 .then(t.unreached_func('must reject'), function() {}); | |
| 33 }, 'A didFailAccessControlCheck() error should output an error message'); | |
| 34 | |
| 35 // A didFailRedirectCheck() error that has no console error messages from | |
| 36 // outside modules/fetch, and thus we output messages from modules/fetch. | |
| 37 sequential_promise_test(function(t) { | |
| 38 return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count= 100&ACAOrigin=*') | |
| 39 .then(t.unreached_func('must reject'), function() {}); | |
| 40 }, 'A didFailRedirectCheck() error should output an error message'); | |
| 41 | |
| 42 sequential_promise_test_done(); | |
| 43 </script> | |
| OLD | NEW |