summaryrefslogtreecommitdiffstats
path: root/tools/profiler/tests/browser/browser_test_marker_network_redirect.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/profiler/tests/browser/browser_test_marker_network_redirect.js')
-rw-r--r--tools/profiler/tests/browser/browser_test_marker_network_redirect.js31
1 files changed, 18 insertions, 13 deletions
diff --git a/tools/profiler/tests/browser/browser_test_marker_network_redirect.js b/tools/profiler/tests/browser/browser_test_marker_network_redirect.js
index 28478c2b3b..f5597e97e7 100644
--- a/tools/profiler/tests/browser/browser_test_marker_network_redirect.js
+++ b/tools/profiler/tests/browser/browser_test_marker_network_redirect.js
@@ -28,10 +28,10 @@ add_task(async function test_network_markers_redirect_simple() {
const targetFileNameWithCacheBust = "simple.html";
const url =
- BASE_URL +
+ BASE_URL_HTTPS +
"redirect.sjs?" +
encodeURIComponent(targetFileNameWithCacheBust);
- const targetUrl = BASE_URL + targetFileNameWithCacheBust;
+ const targetUrl = BASE_URL_HTTPS + targetFileNameWithCacheBust;
await BrowserTestUtils.withNewTab(url, async contentBrowser => {
const contentPid = await SpecialPowers.spawn(
@@ -149,7 +149,8 @@ add_task(async function test_network_markers_redirect_resources() {
startProfilerForMarkerTests();
- const url = BASE_URL + "page_with_resources.html?cacheBust=" + Math.random();
+ const url =
+ BASE_URL_HTTPS + "page_with_resources.html?cacheBust=" + Math.random();
await BrowserTestUtils.withNewTab(url, async contentBrowser => {
const contentPid = await SpecialPowers.spawn(
contentBrowser,
@@ -225,6 +226,9 @@ add_task(async function test_network_markers_redirect_resources() {
id: Expect.number(),
pri: Expect.number(),
innerWindowID: Expect.number(),
+ requestStart: Expect.number(),
+ responseStart: Expect.number(),
+ responseEnd: Expect.number(),
};
// These properties are present when a connection is fully opened. This is
@@ -239,9 +243,6 @@ add_task(async function test_network_markers_redirect_resources() {
connectStart: Expect.number(),
tcpConnectEnd: Expect.number(),
connectEnd: Expect.number(),
- requestStart: Expect.number(),
- responseStart: Expect.number(),
- responseEnd: Expect.number(),
};
const expectedPropertiesForStopMarker = {
@@ -250,7 +251,6 @@ add_task(async function test_network_markers_redirect_resources() {
const expectedDataPropertiesForStopMarker = {
...expectedCommonDataProperties,
- ...expectedConnectionProperties,
status: "STATUS_STOP",
URI: Expect.stringContains("/firefox-logo-nightly.svg"),
contentType: "image/svg+xml",
@@ -280,6 +280,7 @@ add_task(async function test_network_markers_redirect_resources() {
);
Assert.objectContainsOnly(parentFirstStopMarker.data, {
...expectedDataPropertiesForStopMarker,
+ ...expectedConnectionProperties,
// The cache information is missing from the content marker, it's only part
// of the parent marker. See Bug 1544821.
// Also, because the request races with the cache, these 2 values are valid:
@@ -292,10 +293,10 @@ add_task(async function test_network_markers_redirect_resources() {
contentFirstStopMarker,
expectedPropertiesForStopMarker
);
- Assert.objectContainsOnly(
- contentFirstStopMarker.data,
- expectedDataPropertiesForStopMarker
- );
+ Assert.objectContainsOnly(contentFirstStopMarker.data, {
+ ...expectedDataPropertiesForStopMarker,
+ ...expectedConnectionProperties,
+ });
Assert.objectContains(
parentRedirectMarker,
@@ -321,7 +322,11 @@ add_task(async function test_network_markers_redirect_resources() {
parentSecondStopMarker,
expectedPropertiesForStopMarker
);
- Assert.objectContainsOnly(parentSecondStopMarker.data, {
+ // In Test-Verify mode, sometimes the properties from
+ // `expectedConnectionProperties` are missing. That's why they're not
+ // included here, and objectContains is used instead of objectContainsOnly
+ // like above.
+ Assert.objectContains(parentSecondStopMarker.data, {
...expectedDataPropertiesForStopMarker,
// The "count" property is absent from the content marker.
count: Expect.number(),
@@ -333,7 +338,7 @@ add_task(async function test_network_markers_redirect_resources() {
contentSecondStopMarker,
expectedPropertiesForStopMarker
);
- Assert.objectContainsOnly(
+ Assert.objectContains(
contentSecondStopMarker.data,
expectedDataPropertiesForStopMarker
);