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

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

Issue 1295373003: Remove sequential_promise_test helper, just use promise_test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove testharness-helpers.js inclusion from bluetooth tests Created 5 years, 4 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 | Annotate | Revision Log
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> 4 <script src="/resources/testharness-helpers.js"></script>
5 <script src="../resources/fetch-test-helpers.js"></script> 5 <script src="../resources/fetch-test-helpers.js"></script>
6 <script> 6 <script>
7 sequential_promise_test(function(t) { 7 promise_test(function(t) {
8 return fetch('../resources/doctype.html') 8 return fetch('../resources/doctype.html')
9 .then(function() {}, t.unreached_func('must resolve')); 9 .then(function() {}, t.unreached_func('must resolve'));
10 }, 'fetch() with 200 should not output error messages'); 10 }, 'fetch() with 200 should not output error messages');
11 11
12 sequential_promise_test(function(t) { 12 promise_test(function(t) {
13 return fetch('../resources/not-found.html') 13 return fetch('../resources/not-found.html')
14 .then(function() {}, t.unreached_func('must resolve')); 14 .then(function() {}, t.unreached_func('must resolve'));
15 }, 'fetch() with 404 should not output error messages'); 15 }, 'fetch() with 404 should not output error messages');
16 16
17 // Two didFail() errors 17 // Two didFail() errors
18 // that have console error messages from outside modules/fetch, 18 // that have console error messages from outside modules/fetch,
19 // and thus we OMIT messages from modules/fetch. 19 // and thus we OMIT messages from modules/fetch.
20 sequential_promise_test(function(t) { 20 promise_test(function(t) {
21 return fetch('../resources/redirect-loop.php?Count=100') 21 return fetch('../resources/redirect-loop.php?Count=100')
22 .then(t.unreached_func('must reject'), function() {}); 22 .then(t.unreached_func('must reject'), function() {});
23 }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages'); 23 }, 'net::ERR_TOO_MANY_REDIRECTS should not output error messages');
24 24
25 sequential_promise_test(function(t) { 25 promise_test(function(t) {
26 return fetch('../resources/slow-failure.cgi') 26 return fetch('../resources/slow-failure.cgi')
27 .then(function() {}, t.unreached_func('must resolve')); 27 .then(function() {}, t.unreached_func('must resolve'));
28 }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages'); 28 }, 'net::ERR_INVALID_CHUNKED_ENCODING should not output error messages');
29 29
30 // A didFailAccessControlCheck() error 30 // A didFailAccessControlCheck() error
31 // that has NO console error messages from outside modules/fetch, 31 // that has NO console error messages from outside modules/fetch,
32 // and thus we OUTPUT a message from modules/fetch. 32 // and thus we OUTPUT a message from modules/fetch.
33 sequential_promise_test(function(t) { 33 promise_test(function(t) {
34 return fetch('http://localhost:8000/fetch/resources/doctype.html') 34 return fetch('http://localhost:8000/fetch/resources/doctype.html')
35 .then(t.unreached_func('must reject'), function() {}); 35 .then(t.unreached_func('must reject'), function() {});
36 }, 'A didFailAccessControlCheck() error should output an error message'); 36 }, 'A didFailAccessControlCheck() error should output an error message');
37 37
38 // A didFailRedirectCheck() error 38 // A didFailRedirectCheck() error
39 // that has NO console error messages from outside modules/fetch, 39 // that has NO console error messages from outside modules/fetch,
40 // and thus we OUTPUT a message from modules/fetch. 40 // and thus we OUTPUT a message from modules/fetch.
41 sequential_promise_test(function(t) { 41 promise_test(function(t) {
42 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=*')
43 .then(t.unreached_func('must reject'), function() {}); 43 .then(t.unreached_func('must reject'), function() {});
44 }, 'A didFailRedirectCheck() error should output an error message'); 44 }, 'A didFailRedirectCheck() error should output an error message');
45 45
46 sequential_promise_test(function(t) { 46 promise_test(function(t) {
47 return Promise.resolve() 47 return Promise.resolve()
48 .then(function() { 48 .then(function() {
49 var request = new Request('http://localhost/'); 49 var request = new Request('http://localhost/');
50 request.context; 50 request.context;
51 }); 51 });
52 }, 'A deprecation warning should be output for Request.context'); 52 }, 'A deprecation warning should be output for Request.context');
53 </script> 53 </script>
OLDNEW
« no previous file with comments | « LayoutTests/bluetooth/writeValue.html ('k') | LayoutTests/http/tests/fetch/resources/thorough-util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698