summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/content-length/too-long.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/fetch/content-length/too-long.window.js')
-rw-r--r--testing/web-platform/tests/fetch/content-length/too-long.window.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/web-platform/tests/fetch/content-length/too-long.window.js b/testing/web-platform/tests/fetch/content-length/too-long.window.js
new file mode 100644
index 0000000000..f8cefaa9c2
--- /dev/null
+++ b/testing/web-platform/tests/fetch/content-length/too-long.window.js
@@ -0,0 +1,4 @@
+promise_test(async t => {
+ const result = await fetch(`resources/content-length.py?length=${encodeURIComponent("Content-Length: 50")}`);
+ await promise_rejects_js(t, TypeError, result.text());
+}, "Content-Length header value of network response exceeds response body");