Chromium Code Reviews| Index: LayoutTests/http/tests/fetch/chromium/error-messages.html |
| diff --git a/LayoutTests/http/tests/fetch/chromium/error-messages.html b/LayoutTests/http/tests/fetch/chromium/error-messages.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e65e9076ebf65b6e505f0e1ab9d0d03b02b55fb9 |
| --- /dev/null |
| +++ b/LayoutTests/http/tests/fetch/chromium/error-messages.html |
| @@ -0,0 +1,43 @@ |
| +<!doctype html> |
| +<script src="/resources/testharness.js"></script> |
| +<script src="/resources/testharnessreport.js"></script> |
| +<script src="../resources/fetch-test-helpers.js"></script> |
| +<script> |
| +sequential_promise_test(function(t) { |
| + return fetch('../resources/doctype.html') |
| + .then(function() {}, t.unreached_func('must resolve')); |
| + }, 'fetch() with 200 should not output error messages'); |
| + |
| +sequential_promise_test(function(t) { |
| + return fetch('../resources/not-found.html') |
| + .then(function() {}, t.unreached_func('must resolve')); |
| + }, 'fetch() with 404 should not output error messages'); |
| + |
| +// Two didFail() errors that have console error messages from outside |
| +// modules/fetch, and thus we don't need messages from modules/fetch. |
| +sequential_promise_test(function(t) { |
| + return fetch('../resources/redirect-loop.php?Count=100') |
| + .then(t.unreached_func('must reject'), function() {}); |
| + }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages'); |
| + |
| +sequential_promise_test(function(t) { |
| + return fetch('../resources/slow-failure.cgi') |
| + .then(function() {}, t.unreached_func('must resolve')); |
| + }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages'); |
| + |
| +// A didFailAccessControlCheck() error that has no console error messages from |
| +// 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.
|
| +sequential_promise_test(function(t) { |
| + return fetch('http://localhost:8000/fetch/resources/doctype.html') |
| + .then(t.unreached_func('must reject'), function() {}); |
| + }, 'A didFailAccessControlCheck() error should output an error message'); |
| + |
| +// A didFailRedirectCheck() error that has no console error messages from |
| +// outside modules/fetch, and thus we output messages from modules/fetch. |
| +sequential_promise_test(function(t) { |
| + return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count=100&ACAOrigin=*') |
| + .then(t.unreached_func('must reject'), function() {}); |
| + }, 'A didFailRedirectCheck() error should output an error message'); |
| + |
| +sequential_promise_test_done(); |
| +</script> |