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

Side by Side Diff: LayoutTests/http/tests/fetch/chromium/error-messages.html

Issue 1216203003: Replace all sequential_promise_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@update-testharnessjs
Patch Set: Created 5 years, 5 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 <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>
5 <script src="../resources/fetch-test-helpers.js"></script> 4 <script src="../resources/fetch-test-helpers.js"></script>
6 <script> 5 <script>
7 sequential_promise_test(function(t) { 6 promise_test(function(t) {
8 return fetch('../resources/doctype.html') 7 return fetch('../resources/doctype.html')
9 .then(function() {}, t.unreached_func('must resolve')); 8 .then(function() {}, t.unreached_func('must resolve'));
10 }, 'fetch() with 200 should not output error messages'); 9 }, 'fetch() with 200 should not output error messages');
11 10
12 sequential_promise_test(function(t) { 11 promise_test(function(t) {
13 return fetch('../resources/not-found.html') 12 return fetch('../resources/not-found.html')
14 .then(function() {}, t.unreached_func('must resolve')); 13 .then(function() {}, t.unreached_func('must resolve'));
15 }, 'fetch() with 404 should not output error messages'); 14 }, 'fetch() with 404 should not output error messages');
16 15
17 // Two didFail() errors 16 // Two didFail() errors
18 // that have console error messages from outside modules/fetch, 17 // that have console error messages from outside modules/fetch,
19 // and thus we OMIT messages from modules/fetch. 18 // and thus we OMIT messages from modules/fetch.
20 sequential_promise_test(function(t) { 19 promise_test(function(t) {
21 return fetch('../resources/redirect-loop.php?Count=100') 20 return fetch('../resources/redirect-loop.php?Count=100')
22 .then(t.unreached_func('must reject'), function() {}); 21 .then(t.unreached_func('must reject'), function() {});
23 }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages'); 22 }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages');
24 23
25 sequential_promise_test(function(t) { 24 promise_test(function(t) {
26 return fetch('../resources/slow-failure.cgi') 25 return fetch('../resources/slow-failure.cgi')
27 .then(function() {}, t.unreached_func('must resolve')); 26 .then(function() {}, t.unreached_func('must resolve'));
28 }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages'); 27 }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages');
29 28
30 // A didFailAccessControlCheck() error 29 // A didFailAccessControlCheck() error
31 // that has NO console error messages from outside modules/fetch, 30 // that has NO console error messages from outside modules/fetch,
32 // and thus we OUTPUT a message from modules/fetch. 31 // and thus we OUTPUT a message from modules/fetch.
33 sequential_promise_test(function(t) { 32 promise_test(function(t) {
34 return fetch('http://localhost:8000/fetch/resources/doctype.html') 33 return fetch('http://localhost:8000/fetch/resources/doctype.html')
35 .then(t.unreached_func('must reject'), function() {}); 34 .then(t.unreached_func('must reject'), function() {});
36 }, 'A didFailAccessControlCheck() error should output an error message'); 35 }, 'A didFailAccessControlCheck() error should output an error message');
37 36
38 // A didFailRedirectCheck() error 37 // A didFailRedirectCheck() error
39 // that has NO console error messages from outside modules/fetch, 38 // that has NO console error messages from outside modules/fetch,
40 // and thus we OUTPUT a message from modules/fetch. 39 // and thus we OUTPUT a message from modules/fetch.
41 sequential_promise_test(function(t) { 40 promise_test(function(t) {
42 return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count= 100&ACAOrigin=*') 41 return fetch('http://localhost:8000/fetch/resources/redirect-loop.php?Count= 100&ACAOrigin=*')
43 .then(t.unreached_func('must reject'), function() {}); 42 .then(t.unreached_func('must reject'), function() {});
44 }, 'A didFailRedirectCheck() error should output an error message'); 43 }, 'A didFailRedirectCheck() error should output an error message');
45 </script> 44 </script>
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/requestDevice.html ('k') | LayoutTests/http/tests/fetch/resources/fetch-access-control-util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698