Add hardware concurrency override

This change exposes a setting in the performance panel that allows developers to configure the value reported by navigator.hardwareConcurrency. With this, e.g., parallel applications using that value to control the degree of parallelism can be tested for different core counts.

Bug: chromium:1297439
Change-Id: I5e39f2d57a217dcef1839f22fa83e6fe3ac8fc6f
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3500840
Reviewed-by: Jack Franklin <[email protected]>
Reviewed-by: Peter Müller <[email protected]>
Commit-Queue: Philip Pfaffe <[email protected]>
diff --git a/test/e2e/helpers/performance-helpers.ts b/test/e2e/helpers/performance-helpers.ts
index 518bee3..43ac8a8 100644
--- a/test/e2e/helpers/performance-helpers.ts
+++ b/test/e2e/helpers/performance-helpers.ts
@@ -4,7 +4,7 @@
 
 import type * as puppeteer from 'puppeteer';
 
-import {click, goToResource, waitFor} from '../../shared/helper.js';
+import {click, goToResource, waitFor, waitForAria} from '../../shared/helper.js';
 
 export const RECORD_BUTTON_SELECTOR = '[aria-label="Record"]';
 export const STOP_BUTTON_SELECTOR = '[aria-label="Stop"]';
@@ -27,6 +27,12 @@
   await waitFor('.timeline-landing-page');
 }
 
+export async function openCaptureSettings(sectionClassName: string) {
+  const captureSettingsButton = await waitForAria('Capture settings');
+  await captureSettingsButton.click();
+  return await waitFor(sectionClassName);
+}
+
 export async function searchForComponent(frontend: puppeteer.Page, searchEntry: string) {
   await frontend.keyboard.down('Control');
   await frontend.keyboard.press('KeyF');