summaryrefslogtreecommitdiffstats
path: root/netwerk/test/unit
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:40:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 02:40:47 +0000
commit46db793222dee55d0b846c6ba99a39e2d969c52a (patch)
treed95f8ea0fb9c9c4eb9ae55c70faa2bc02a7bcea4 /netwerk/test/unit
parentAdding upstream version 115.9.1esr. (diff)
downloadfirefox-esr-46db793222dee55d0b846c6ba99a39e2d969c52a.tar.xz
firefox-esr-46db793222dee55d0b846c6ba99a39e2d969c52a.zip
Adding upstream version 115.10.0esr.upstream/115.10.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'netwerk/test/unit')
-rw-r--r--netwerk/test/unit/http2_test_common.js16
-rw-r--r--netwerk/test/unit/test_http2.js9
-rw-r--r--netwerk/test/unit/test_http2_with_proxy.js9
3 files changed, 34 insertions, 0 deletions
diff --git a/netwerk/test/unit/http2_test_common.js b/netwerk/test/unit/http2_test_common.js
index 341aa191da..163890e1a7 100644
--- a/netwerk/test/unit/http2_test_common.js
+++ b/netwerk/test/unit/http2_test_common.js
@@ -1151,6 +1151,22 @@ async function test_http2_continuations(loadGroup, serverPort) {
});
}
+async function test_http2_continuations_over_max_response_limit(
+ loadGroup,
+ serverPort
+) {
+ var chan = makeHTTPChannel(
+ `https://localhost:${serverPort}/hugecontinuedheaders?size=385`
+ );
+ chan.loadGroup = loadGroup;
+ return new Promise(resolve => {
+ var listener = new Http2CheckListener();
+ listener.finish = resolve;
+ listener.shouldSucceed = false;
+ chan.asyncOpen(listener);
+ });
+}
+
function Http2IllegalHpackValidationListener() {}
Http2IllegalHpackValidationListener.prototype = new Http2CheckListener();
diff --git a/netwerk/test/unit/test_http2.js b/netwerk/test/unit/test_http2.js
index 1324527db6..a7e305e118 100644
--- a/netwerk/test/unit/test_http2.js
+++ b/netwerk/test/unit/test_http2.js
@@ -477,3 +477,12 @@ add_task(async function do_test_http2_push_userContext3() {
);
Assert.equal(httpProxyConnectResponseCode, -1);
});
+
+add_task(async function do_test_http2_continuations_over_max_response_limit() {
+ const { httpProxyConnectResponseCode } =
+ await test_http2_continuations_over_max_response_limit(
+ loadGroup,
+ serverPort
+ );
+ Assert.equal(httpProxyConnectResponseCode, -1);
+});
diff --git a/netwerk/test/unit/test_http2_with_proxy.js b/netwerk/test/unit/test_http2_with_proxy.js
index 858a0da570..dcc913f039 100644
--- a/netwerk/test/unit/test_http2_with_proxy.js
+++ b/netwerk/test/unit/test_http2_with_proxy.js
@@ -423,3 +423,12 @@ add_task(async function do_test_http2_push_userContext3() {
);
Assert.equal(httpProxyConnectResponseCode, 200);
});
+
+add_task(async function do_test_http2_continuations_over_max_response_limit() {
+ const { httpProxyConnectResponseCode } =
+ await test_http2_continuations_over_max_response_limit(
+ loadGroup,
+ serverPort
+ );
+ Assert.equal(httpProxyConnectResponseCode, 200);
+});