summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-15 03:34:50 +0000
commitdef92d1b8e9d373e2f6f27c366d578d97d8960c6 (patch)
tree2ef34b9ad8bb9a9220e05d60352558b15f513894 /devtools/client/netmonitor/test
parentAdding debian version 125.0.3-1. (diff)
downloadfirefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.tar.xz
firefox-def92d1b8e9d373e2f6f27c366d578d97d8960c6.zip
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/netmonitor/test')
-rw-r--r--devtools/client/netmonitor/test/browser_net_cached-status.js3
-rw-r--r--devtools/client/netmonitor/test/browser_net_copy_as_powershell.js8
-rw-r--r--devtools/client/netmonitor/test/browser_net_copy_headers.js1
-rw-r--r--devtools/client/netmonitor/test/browser_net_headers_sorted.js2
-rw-r--r--devtools/client/netmonitor/test/browser_net_http3_request_details.js4
-rw-r--r--devtools/client/netmonitor/test/browser_net_resend.js11
-rw-r--r--devtools/client/netmonitor/test/browser_net_simple-request-details.js4
7 files changed, 24 insertions, 9 deletions
diff --git a/devtools/client/netmonitor/test/browser_net_cached-status.js b/devtools/client/netmonitor/test/browser_net_cached-status.js
index b41362b398..d6dd5519c5 100644
--- a/devtools/client/netmonitor/test/browser_net_cached-status.js
+++ b/devtools/client/netmonitor/test/browser_net_cached-status.js
@@ -10,6 +10,9 @@
add_task(async function () {
// Disable rcwn to make cache behavior deterministic.
await pushPref("network.http.rcwn.enabled", false);
+ // performing http to https redirects, hence we do not
+ // want https-first to interfere with that test
+ await pushPref("dom.security.https_first", false);
const { tab, monitor } = await initNetMonitor(STATUS_CODES_URL, {
enableCache: true,
diff --git a/devtools/client/netmonitor/test/browser_net_copy_as_powershell.js b/devtools/client/netmonitor/test/browser_net_copy_as_powershell.js
index 5785b89929..8160b10cfa 100644
--- a/devtools/client/netmonitor/test/browser_net_copy_as_powershell.js
+++ b/devtools/client/netmonitor/test/browser_net_copy_as_powershell.js
@@ -19,7 +19,7 @@ add_task(async function () {
-Headers @{
"Accept" = "*/*"
"Accept-Language" = "en-US"
- "Accept-Encoding" = "gzip, deflate, br"
+ "Accept-Encoding" = "gzip, deflate, br, zstd"
"X-Custom-Header-1" = "Custom value"
"X-Custom-Header-2" = "8.8.8.8"
"X-Custom-Header-3" = "Mon, 3 Mar 2014 11:11:11 GMT"
@@ -42,7 +42,7 @@ Invoke-WebRequest -UseBasicParsing -Uri "https://example.com/browser/devtools/cl
-Headers @{
"Accept" = "*/*"
"Accept-Language" = "en-US"
- "Accept-Encoding" = "gzip, deflate, br"
+ "Accept-Encoding" = "gzip, deflate, br, zstd"
"X-Custom-Header-1" = "Custom value"
"X-Custom-Header-2" = "8.8.8.8"
"X-Custom-Header-3" = "Mon, 3 Mar 2014 11:11:11 GMT"
@@ -66,7 +66,7 @@ Invoke-WebRequest -UseBasicParsing -Uri "https://example.com/browser/devtools/cl
-Headers @{
"Accept" = "*/*"
"Accept-Language" = "en-US"
- "Accept-Encoding" = "gzip, deflate, br"
+ "Accept-Encoding" = "gzip, deflate, br, zstd"
"X-Custom-Header-1" = "Custom value"
"X-Custom-Header-2" = "8.8.8.8"
"X-Custom-Header-3" = "Mon, 3 Mar 2014 11:11:11 GMT"
@@ -95,7 +95,7 @@ Invoke-WebRequest -UseBasicParsing -Uri "https://example.com/browser/devtools/cl
-Headers @{
"Accept" = "*/*"
"Accept-Language" = "en-US"
- "Accept-Encoding" = "gzip, deflate, br"
+ "Accept-Encoding" = "gzip, deflate, br, zstd"
"X-Custom-Header-1" = "Custom value"
"X-Custom-Header-2" = "8.8.8.8"
"X-Custom-Header-3" = "Mon, 3 Mar 2014 11:11:11 GMT"
diff --git a/devtools/client/netmonitor/test/browser_net_copy_headers.js b/devtools/client/netmonitor/test/browser_net_copy_headers.js
index cd6499d93b..458a19af97 100644
--- a/devtools/client/netmonitor/test/browser_net_copy_headers.js
+++ b/devtools/client/netmonitor/test/browser_net_copy_headers.js
@@ -47,6 +47,7 @@ add_task(async function () {
"Accept-Encoding: gzip, deflate",
"Connection: keep-alive",
"Upgrade-Insecure-Requests: 1",
+ "Priority: u=1",
"Pragma: no-cache",
"Cache-Control: no-cache",
].join("\n");
diff --git a/devtools/client/netmonitor/test/browser_net_headers_sorted.js b/devtools/client/netmonitor/test/browser_net_headers_sorted.js
index 2965ea8d3c..ea12b1c67e 100644
--- a/devtools/client/netmonitor/test/browser_net_headers_sorted.js
+++ b/devtools/client/netmonitor/test/browser_net_headers_sorted.js
@@ -71,6 +71,7 @@ async function verifyHeaders(monitor) {
"Cookie",
"Host",
"Pragma",
+ "Priority",
"Sec-Fetch-Dest",
"Sec-Fetch-Mode",
"Sec-Fetch-Site",
@@ -144,6 +145,7 @@ async function verifyRawHeaders(monitor) {
"Sec-Fetch-Dest",
"Sec-Fetch-Mode",
"Sec-Fetch-Site",
+ "Priority",
"Pragma",
"Cache-Control",
];
diff --git a/devtools/client/netmonitor/test/browser_net_http3_request_details.js b/devtools/client/netmonitor/test/browser_net_http3_request_details.js
index 9ceb9dba88..6a6c5973c9 100644
--- a/devtools/client/netmonitor/test/browser_net_http3_request_details.js
+++ b/devtools/client/netmonitor/test/browser_net_http3_request_details.js
@@ -74,8 +74,8 @@ add_task(async function () {
// The Text-Encoding header is not consistently displayed, exclude it from
// the assertion. See Bug 1830053.
headers.filter(cell => cell.textContent != "TE").length,
- 25,
- "There should be 25 header values displayed in this tabpanel."
+ 26,
+ "There should be 26 header values displayed in this tabpanel."
);
const headersTable = tabpanel.querySelector(".accordion");
diff --git a/devtools/client/netmonitor/test/browser_net_resend.js b/devtools/client/netmonitor/test/browser_net_resend.js
index cc3c212988..9150bfe3ba 100644
--- a/devtools/client/netmonitor/test/browser_net_resend.js
+++ b/devtools/client/netmonitor/test/browser_net_resend.js
@@ -60,14 +60,23 @@ async function testResendRequest() {
"The resent request has the same url and query parameters and the first request"
);
+ // The priority header only appears when the urgency and incremental values
+ // are not both default values (u=3 and i=false). In this case the original
+ // request has no priority header and the resent request does, hence we subtract one.
is(
firstResend.originalResource.requestHeaders.headers.length,
- firstResend.newResource.requestHeaders.headers.length,
+ firstResend.newResource.requestHeaders.headers.length - 1,
"The no of headers are the same"
);
+ // Because a resent request has a different purpose and principal it will
+ // also have a different CoS flag (meaning a different priority header).
+ // So we can't compare the original and resent request's priority and skip it.
firstResend.originalResource.requestHeaders.headers.forEach(
({ name, value }) => {
+ if (name === "Priority") {
+ return;
+ }
const foundHeader = firstResend.newResource.requestHeaders.headers.find(
header => header.name == name
);
diff --git a/devtools/client/netmonitor/test/browser_net_simple-request-details.js b/devtools/client/netmonitor/test/browser_net_simple-request-details.js
index e52a0b101a..e7d07f392c 100644
--- a/devtools/client/netmonitor/test/browser_net_simple-request-details.js
+++ b/devtools/client/netmonitor/test/browser_net_simple-request-details.js
@@ -137,8 +137,8 @@ add_task(async function () {
is(
tabpanel.querySelectorAll(".accordion .treeLabelCell").length,
- 23,
- "There should be 23 header values displayed in this tabpanel."
+ 24,
+ "There should be 24 header values displayed in this tabpanel."
);
const headersTable = tabpanel.querySelector(".accordion");