summaryrefslogtreecommitdiffstats
path: root/tools/profiler/tests/browser
diff options
context:
space:
mode:
Diffstat (limited to 'tools/profiler/tests/browser')
-rw-r--r--tools/profiler/tests/browser/browser.toml7
-rw-r--r--tools/profiler/tests/browser/browser_test_marker_network_cancel.js2
-rw-r--r--tools/profiler/tests/browser/browser_test_marker_network_redirect.js31
-rw-r--r--tools/profiler/tests/browser/browser_test_marker_network_simple.js2
-rw-r--r--tools/profiler/tests/browser/browser_test_markers_parent_process.js9
-rw-r--r--tools/profiler/tests/browser/browser_test_profile_capture_by_pid.js10
-rw-r--r--tools/profiler/tests/browser/browser_test_profile_multi_frame_page_info.js6
-rw-r--r--tools/profiler/tests/browser/browser_test_profile_single_frame_page_info.js2
-rw-r--r--tools/profiler/tests/browser/browser_test_profile_slow_capture.js4
-rw-r--r--tools/profiler/tests/browser/serviceworkers/serviceworker_no_fetch_handler.js2
-rw-r--r--tools/profiler/tests/browser/serviceworkers/serviceworker_no_respondWith_in_fetch_handler.js2
-rw-r--r--tools/profiler/tests/browser/serviceworkers/serviceworker_synthetized_response.js2
12 files changed, 39 insertions, 40 deletions
diff --git a/tools/profiler/tests/browser/browser.toml b/tools/profiler/tests/browser/browser.toml
index 57d8ad0875..fdbdd7c7ce 100644
--- a/tools/profiler/tests/browser/browser.toml
+++ b/tools/profiler/tests/browser/browser.toml
@@ -15,14 +15,12 @@ support-files = ["do_work_500ms.html"]
support-files = ["do_work_500ms.html"]
["browser_test_marker_network_cancel.js"]
-https_first_disabled = true
support-files = ["simple.html"]
["browser_test_marker_network_private_browsing.js"]
support-files = ["simple.html"]
["browser_test_marker_network_redirect.js"]
-https_first_disabled = true
support-files = [
"redirect.sjs",
"simple.html",
@@ -67,7 +65,6 @@ support-files = [
]
["browser_test_marker_network_simple.js"]
-https_first_disabled = true
support-files = ["simple.html"]
["browser_test_marker_network_sts.js"]
@@ -81,24 +78,20 @@ support-files = ["simple.html"]
support-files = ["single_frame.html"]
["browser_test_profile_capture_by_pid.js"]
-https_first_disabled = true
support-files = ["single_frame.html"]
["browser_test_profile_fission.js"]
support-files = ["single_frame.html"]
["browser_test_profile_multi_frame_page_info.js"]
-https_first_disabled = true
support-files = [
"multi_frame.html",
"single_frame.html",
]
["browser_test_profile_single_frame_page_info.js"]
-https_first_disabled = true
support-files = ["single_frame.html"]
["browser_test_profile_slow_capture.js"]
-https_first_disabled = true
support-files = ["single_frame.html"]
skip-if = ["!debug"]
diff --git a/tools/profiler/tests/browser/browser_test_marker_network_cancel.js b/tools/profiler/tests/browser/browser_test_marker_network_cancel.js
index df3de2b99a..4e144ba700 100644
--- a/tools/profiler/tests/browser/browser_test_marker_network_cancel.js
+++ b/tools/profiler/tests/browser/browser_test_marker_network_cancel.js
@@ -13,7 +13,7 @@ add_task(async function test_network_markers_early_cancel() {
startProfilerForMarkerTests();
- const url = BASE_URL + "simple.html?cacheBust=" + Math.random();
+ const url = BASE_URL_HTTPS + "simple.html?cacheBust=" + Math.random();
const options = {
gBrowser,
url: "about:blank",
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
);
diff --git a/tools/profiler/tests/browser/browser_test_marker_network_simple.js b/tools/profiler/tests/browser/browser_test_marker_network_simple.js
index 15894305a7..01f68216ee 100644
--- a/tools/profiler/tests/browser/browser_test_marker_network_simple.js
+++ b/tools/profiler/tests/browser/browser_test_marker_network_simple.js
@@ -13,7 +13,7 @@ add_task(async function test_network_markers() {
startProfilerForMarkerTests();
- const url = BASE_URL + "simple.html?cacheBust=" + Math.random();
+ const url = BASE_URL_HTTPS + "simple.html?cacheBust=" + Math.random();
await BrowserTestUtils.withNewTab(url, async contentBrowser => {
const contentPid = await SpecialPowers.spawn(
contentBrowser,
diff --git a/tools/profiler/tests/browser/browser_test_markers_parent_process.js b/tools/profiler/tests/browser/browser_test_markers_parent_process.js
index 28b82f8054..939271ee66 100644
--- a/tools/profiler/tests/browser/browser_test_markers_parent_process.js
+++ b/tools/profiler/tests/browser/browser_test_markers_parent_process.js
@@ -26,12 +26,13 @@ add_task(async function test_markers_parent_process() {
);
ok(domEventStart, "A start DOMEvent was generated");
ok(domEventEnd, "An end DOMEvent was generated");
- ok(
- domEventEnd.data.latency > 0,
+ Assert.greater(
+ domEventEnd.data.latency,
+ 0,
"DOMEvent had a a latency value generated."
);
- ok(domEventEnd.data.type === "DOMEvent");
- ok(domEventEnd.name === "DOMEvent");
+ Assert.strictEqual(domEventEnd.data.type, "DOMEvent");
+ Assert.strictEqual(domEventEnd.name, "DOMEvent");
}
// Add more marker tests.
});
diff --git a/tools/profiler/tests/browser/browser_test_profile_capture_by_pid.js b/tools/profiler/tests/browser/browser_test_profile_capture_by_pid.js
index 14d76dbcaf..0d206a7148 100644
--- a/tools/profiler/tests/browser/browser_test_profile_capture_by_pid.js
+++ b/tools/profiler/tests/browser/browser_test_profile_capture_by_pid.js
@@ -26,7 +26,7 @@ async function test_with_filter(fnFilterWithContentId) {
await Services.profiler.ClearAllPages();
info("Open a tab with single_frame.html in it.");
- const url = BASE_URL + "single_frame.html";
+ const url = BASE_URL_HTTPS + "single_frame.html";
return BrowserTestUtils.withNewTab(url, async function (contentBrowser) {
const contentPid = await SpecialPowers.spawn(contentBrowser, [], () => {
return Services.appinfo.processID;
@@ -107,7 +107,7 @@ add_task(async function browser_test_profile_capture_along_with_content_pid() {
add_task(async function browser_test_profile_capture_along_with_other_pid() {
const parentPid = Services.appinfo.processID;
const { contentPid, pidsWithSamplerThread, profile } = await test_with_filter(
- contentPid => ["GeckoMain", "pid:" + parentPid]
+ () => ["GeckoMain", "pid:" + parentPid]
);
Assert.greater(
@@ -174,9 +174,9 @@ add_task(async function browser_test_profile_capture_by_only_content_pid() {
add_task(async function browser_test_profile_capture_by_only_parent_pid() {
const parentPid = Services.appinfo.processID;
- const { pidsWithSamplerThread, profile } = await test_with_filter(
- contentPid => ["pid:" + parentPid]
- );
+ const { pidsWithSamplerThread, profile } = await test_with_filter(() => [
+ "pid:" + parentPid,
+ ]);
Assert.deepEqual(
pidsWithSamplerThread,
diff --git a/tools/profiler/tests/browser/browser_test_profile_multi_frame_page_info.js b/tools/profiler/tests/browser/browser_test_profile_multi_frame_page_info.js
index 854587678d..b1dfbb60c3 100644
--- a/tools/profiler/tests/browser/browser_test_profile_multi_frame_page_info.js
+++ b/tools/profiler/tests/browser/browser_test_profile_multi_frame_page_info.js
@@ -23,7 +23,7 @@ add_task(async function test_profile_multi_frame_page_info() {
info("Open a tab with multi_frame.html in it.");
// multi_frame.html embeds single_frame.html inside an iframe.
- const url = BASE_URL + "multi_frame.html";
+ const url = BASE_URL_HTTPS + "multi_frame.html";
await BrowserTestUtils.withNewTab(url, async function (contentBrowser) {
const contentPid = await SpecialPowers.spawn(contentBrowser, [], () => {
return Services.appinfo.processID;
@@ -63,8 +63,8 @@ add_task(async function test_profile_multi_frame_page_info() {
for (const page of contentProcess.pages) {
// Child page (iframe)
- if (page.url == BASE_URL + "single_frame.html") {
- Assert.equal(page.url, BASE_URL + "single_frame.html");
+ if (page.url == BASE_URL_HTTPS + "single_frame.html") {
+ Assert.equal(page.url, BASE_URL_HTTPS + "single_frame.html");
Assert.equal(typeof page.tabID, "number");
Assert.equal(page.tabID, activeTabID);
Assert.equal(typeof page.innerWindowID, "number");
diff --git a/tools/profiler/tests/browser/browser_test_profile_single_frame_page_info.js b/tools/profiler/tests/browser/browser_test_profile_single_frame_page_info.js
index 0385413c16..3249e728b7 100644
--- a/tools/profiler/tests/browser/browser_test_profile_single_frame_page_info.js
+++ b/tools/profiler/tests/browser/browser_test_profile_single_frame_page_info.js
@@ -22,7 +22,7 @@ add_task(async function test_profile_single_frame_page_info() {
await startProfiler();
info("Open a tab with single_frame.html in it.");
- const url = BASE_URL + "single_frame.html";
+ const url = BASE_URL_HTTPS + "single_frame.html";
await BrowserTestUtils.withNewTab(url, async function (contentBrowser) {
const contentPid = await SpecialPowers.spawn(contentBrowser, [], () => {
return Services.appinfo.processID;
diff --git a/tools/profiler/tests/browser/browser_test_profile_slow_capture.js b/tools/profiler/tests/browser/browser_test_profile_slow_capture.js
index 4a675b84d1..16684a35dd 100644
--- a/tools/profiler/tests/browser/browser_test_profile_slow_capture.js
+++ b/tools/profiler/tests/browser/browser_test_profile_slow_capture.js
@@ -13,7 +13,7 @@ add_task(async function browser_test_profile_slow_capture() {
await startProfiler({ threads: ["GeckoMain", "test-debug-child-slow-json"] });
info("Open a tab with single_frame.html in it.");
- const url = BASE_URL + "single_frame.html";
+ const url = BASE_URL_HTTPS + "single_frame.html";
await BrowserTestUtils.withNewTab(url, async function (contentBrowser) {
const contentPid = await SpecialPowers.spawn(contentBrowser, [], () => {
return Services.appinfo.processID;
@@ -78,7 +78,7 @@ add_task(async function browser_test_profile_very_slow_capture() {
});
info("Open a tab with single_frame.html in it.");
- const url = BASE_URL + "single_frame.html";
+ const url = BASE_URL_HTTPS + "single_frame.html";
await BrowserTestUtils.withNewTab(url, async function (contentBrowser) {
const contentPid = await SpecialPowers.spawn(contentBrowser, [], () => {
return Services.appinfo.processID;
diff --git a/tools/profiler/tests/browser/serviceworkers/serviceworker_no_fetch_handler.js b/tools/profiler/tests/browser/serviceworkers/serviceworker_no_fetch_handler.js
index f656665ca0..7a8ed91d28 100644
--- a/tools/profiler/tests/browser/serviceworkers/serviceworker_no_fetch_handler.js
+++ b/tools/profiler/tests/browser/serviceworkers/serviceworker_no_fetch_handler.js
@@ -1,4 +1,4 @@
-self.addEventListener("install", event => {
+self.addEventListener("install", () => {
performance.mark("__serviceworker_event");
console.log("[SW]:", "Install event");
});
diff --git a/tools/profiler/tests/browser/serviceworkers/serviceworker_no_respondWith_in_fetch_handler.js b/tools/profiler/tests/browser/serviceworkers/serviceworker_no_respondWith_in_fetch_handler.js
index 255c8269a1..ba0610665b 100644
--- a/tools/profiler/tests/browser/serviceworkers/serviceworker_no_respondWith_in_fetch_handler.js
+++ b/tools/profiler/tests/browser/serviceworkers/serviceworker_no_respondWith_in_fetch_handler.js
@@ -1,4 +1,4 @@
-self.addEventListener("install", event => {
+self.addEventListener("install", () => {
performance.mark("__serviceworker_event");
console.log("[SW]:", "Install event");
});
diff --git a/tools/profiler/tests/browser/serviceworkers/serviceworker_synthetized_response.js b/tools/profiler/tests/browser/serviceworkers/serviceworker_synthetized_response.js
index 891b679a5f..13c529d0d3 100644
--- a/tools/profiler/tests/browser/serviceworkers/serviceworker_synthetized_response.js
+++ b/tools/profiler/tests/browser/serviceworkers/serviceworker_synthetized_response.js
@@ -1,4 +1,4 @@
-self.addEventListener("install", event => {
+self.addEventListener("install", () => {
performance.mark("__serviceworker_event");
dump("[SW]:", "Install event\n");
});