diff options
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(); |