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

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

Issue 1195453005: [Fetch] Omit console error messages for cancellation, timeout, and non-BlinkInternal (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Comment fix. Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/fetch/chromium/error-messages-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b781799237cf77fae625a4f731dc48d34e5d3e8f
--- /dev/null
+++ b/LayoutTests/http/tests/fetch/chromium/error-messages.html
@@ -0,0 +1,46 @@
+<!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 OMIT 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 OUTPUT a message from modules/fetch.
+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 a message 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>
« no previous file with comments | « no previous file | LayoutTests/http/tests/fetch/chromium/error-messages-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698