diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /toolkit/components/processtools | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/processtools')
-rw-r--r-- | toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js | 14 | ||||
-rw-r--r-- | toolkit/components/processtools/tests/browser/browser_test_procinfo.js | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js b/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js index 93833a5207..0ebaaa969e 100644 --- a/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js +++ b/toolkit/components/processtools/tests/browser/browser_test_powerMetrics.js @@ -87,16 +87,12 @@ add_task(async () => { let initalCpuTime = await getChildCpuTime(pid); let afterCpuTime; do { - await SpecialPowers.spawn( - firstBrowser, - [kBusyWaitForMs], - async kBusyWaitForMs => { - let startTime = Date.now(); - while (Date.now() - startTime < 10) { - // Burn CPU time... - } + await SpecialPowers.spawn(firstBrowser, [kBusyWaitForMs], async () => { + let startTime = Date.now(); + while (Date.now() - startTime < 10) { + // Burn CPU time... } - ); + }); afterCpuTime = await getChildCpuTime(pid); } while (afterCpuTime - initalCpuTime < kBusyWaitForMs * kNS_PER_MS); cpuTimeSpentOnBackgroundTab = Math.floor( diff --git a/toolkit/components/processtools/tests/browser/browser_test_procinfo.js b/toolkit/components/processtools/tests/browser/browser_test_procinfo.js index 07c7d5d2d0..5a301c664a 100644 --- a/toolkit/components/processtools/tests/browser/browser_test_procinfo.js +++ b/toolkit/components/processtools/tests/browser/browser_test_procinfo.js @@ -58,7 +58,7 @@ add_task(async function test_proc_info() { await BrowserTestUtils.withNewTab( { gBrowser, url: DUMMY_URL }, - async function (browser) { + async function () { // We test `SAMPLE_SIZE` times to increase a tad the chance of encountering race conditions. for (let z = 0; z < SAMPLE_SIZE; z++) { let parentProc = await ChromeUtils.requestProcInfo(); |