diff --git a/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts b/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts index bacff5bcdca2..024f36d808f0 100644 --- a/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/navigation_test.ts @@ -32,7 +32,7 @@ import { // This test will fail (by default) in headful mode, as the target page never gets painted. // To resolve this when debugging, just make sure the target page is visible during the lighthouse run. -describe('Navigation', async function() { +describe('Navigation', function() { // The tests in this suite are particularly slow if (this.timeout() !== 0) { this.timeout(60_000); @@ -108,6 +108,12 @@ describe('Navigation', async function() { assert.include(lhr.configSettings.emulatedUserAgent, 'Mobile'); assert.include(lhr.environment.networkUserAgent, 'Mobile'); + const trace = artifacts.Trace; + assert.notOk( + trace.traceEvents.some((e: Record) => e.cat === 'disabled-by-default-v8.cpu_profiler'), + 'Trace contained v8 profiler events', + ); + assert.deepStrictEqual(artifacts.ViewportDimensions, { innerHeight: 823, innerWidth: 412, @@ -160,8 +166,7 @@ describe('Navigation', async function() { const waitForJson = await interceptNextFileSave(); // For some reason the CDP click command doesn't work here even if the tools menu is open. - await reportEl.$eval( - 'a[data-action="save-json"]:not(.hidden)', saveJsonEl => (saveJsonEl as HTMLElement).click()); + await reportEl.$eval('a[data-action="save-json"]:not(.hidden)', saveJsonEl => (saveJsonEl as HTMLElement).click()); const jsonContent = await waitForJson(); assert.strictEqual(jsonContent, JSON.stringify(lhr, null, 2)); @@ -169,8 +174,7 @@ describe('Navigation', async function() { const waitForHtml = await interceptNextFileSave(); // For some reason the CDP click command doesn't work here even if the tools menu is open. - await reportEl.$eval( - 'a[data-action="save-html"]:not(.hidden)', saveHtmlEl => (saveHtmlEl as HTMLElement).click()); + await reportEl.$eval('a[data-action="save-html"]:not(.hidden)', saveHtmlEl => (saveHtmlEl as HTMLElement).click()); const htmlContent = await waitForHtml(); const iframeHandle = await renderHtmlInIframe(htmlContent); @@ -222,6 +226,7 @@ describe('Navigation', async function() { await navigateToLighthouseTab('lighthouse/hello.html'); await registerServiceWorker(); + await setToolbarCheckboxWithText(true, 'Enable JS sampling'); // TODO: Use translated string once it's added await setToolbarCheckboxWithText(false, 'Borrar almacenamiento'); await selectCategories(['performance', 'best-practices']); await selectDevice('desktop'); @@ -230,6 +235,12 @@ describe('Navigation', async function() { const {reportEl, lhr, artifacts} = await waitForResult(); + const trace = artifacts.Trace; + assert.ok( + trace.traceEvents.some((e: Record) => e.cat === 'disabled-by-default-v8.cpu_profiler'), + 'Trace did not contain any v8 profiler events', + ); + const {innerWidth, innerHeight, devicePixelRatio} = artifacts.ViewportDimensions; // TODO: Figure out why outerHeight can be different depending on OS assert.strictEqual(innerHeight, 720); diff --git a/third-party/devtools-tests/e2e/lighthouse/snapshot_test.ts b/third-party/devtools-tests/e2e/lighthouse/snapshot_test.ts index c76bd8013535..1afdce2b9c96 100644 --- a/third-party/devtools-tests/e2e/lighthouse/snapshot_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/snapshot_test.ts @@ -20,7 +20,7 @@ import { // This test will fail (by default) in headful mode, as the target page never gets painted. // To resolve this when debugging, just make sure the target page is visible during the lighthouse run. -describe('Snapshot', async function() { +describe('Snapshot', function() { // The tests in this suite are particularly slow if (this.timeout() !== 0) { this.timeout(60_000); diff --git a/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts b/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts index 38cc9fadceeb..427b1f6d5562 100644 --- a/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/start-view_test.ts @@ -15,7 +15,7 @@ import { waitForStorageUsage, } from '../helpers/lighthouse-helpers.js'; -describe('The Lighthouse start view', async () => { +describe('The Lighthouse start view', () => { it('shows a button to generate a new report', async () => { await navigateToLighthouseTab('empty.html'); diff --git a/third-party/devtools-tests/e2e/lighthouse/timespan_test.ts b/third-party/devtools-tests/e2e/lighthouse/timespan_test.ts index 966f589ebf5e..1f95e7bb5d3b 100644 --- a/third-party/devtools-tests/e2e/lighthouse/timespan_test.ts +++ b/third-party/devtools-tests/e2e/lighthouse/timespan_test.ts @@ -24,7 +24,7 @@ import { // This test will fail (by default) in headful mode, as the target page never gets painted. // To resolve this when debugging, just make sure the target page is visible during the lighthouse run. -describe('Timespan', async function() { +describe('Timespan', function() { // The tests in this suite are particularly slow if (this.timeout() !== 0) { this.timeout(60_000);