Skip to content

Commit d658fd5

Browse files
OrKoNDevtools-frontend LUCI CQ
authored andcommitted
Enable DeferRendererTasksAfterInput
With DeferRendererTasksAfterInput shipping in Chrome by default, there is no guarantee that that all triggered by the CDP input (for example, Input.dispatchMouseEvent) will be processed before the next task (for example, Runtime.evaluate) runs. This makes the tests that do not wait for the expected page state to become more flaky if the input task was delayed. Tests like these should be treated as other flaky tests and either fixed or disabled for investigation. Bug: 361078921 Change-Id: I4002b9014e0af1576d5d319c67663b2087a86007 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6226408 Commit-Queue: Alex Rudenko <[email protected]> Reviewed-by: Benedikt Meurer <[email protected]>
1 parent 83ee797 commit d658fd5

File tree

11 files changed

+81
-28
lines changed

11 files changed

+81
-28
lines changed

test/conductor/hooks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ function launchChrome() {
7575
];
7676

7777
const disabledFeatures = [
78-
'DeferRendererTasksAfterInput', // crbug.com/361078921
7978
'PMProcessPriorityPolicy', // crbug.com/361252079
8079
'MojoChannelAssociatedSendUsesRunOrPostTask', // crbug.com/376228320
8180
'RasterInducingScroll', // crbug.com/381055647

test/e2e/console/console-eval-global_test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {click, getBrowserAndPages, pasteText, step} from '../../shared/helper.js
88
import {CONSOLE_TAB_SELECTOR, focusConsolePrompt, getCurrentConsoleMessages} from '../helpers/console-helpers.js';
99

1010
describe('The Console Tab', () => {
11-
it('interacts with the global scope correctly', async () => {
11+
// Flaky with crbug.com/361078921
12+
it.skip('[crbug.com/361078921]: interacts with the global scope correctly', async () => {
1213
const {frontend} = getBrowserAndPages();
1314

1415
await step('navigate to the Console tab', async () => {

test/e2e/elements/style-pane-properties_test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ describe('The Styles pane', () => {
264264
'The correct rule is displayed');
265265
});
266266

267-
it('can edit multiple constructed stylesheets', async () => {
267+
// Flaky with crbug.com/361078921
268+
it.skip('[crbug.com/361078921]: can edit multiple constructed stylesheets', async () => {
268269
await goToResourceAndWaitForStyleSection('elements/multiple-constructed-stylesheets.html');
269270

270271
// Select div that we will remove a CSS property from.
@@ -327,7 +328,8 @@ describe('The Styles pane', () => {
327328
assert.deepEqual(computedStyles, ['rgb(255, 0, 0)', 'rgb(255, 0, 0)'], 'Styles are not correct after the update');
328329
});
329330

330-
it('can display and edit container queries', async () => {
331+
// Flaky with crbug.com/361078921
332+
it.skip('[crbug.com/361078921]: can display and edit container queries', async () => {
331333
await goToResourceAndWaitForStyleSection('elements/css-container-queries.html');
332334

333335
// Select the child that has container queries.

test/e2e/helpers/performance-helpers.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,21 @@ export async function openCaptureSettings(sectionClassName: string) {
8686
export async function searchForComponent(frontend: puppeteer.Page, searchEntry: string) {
8787
await waitFor('devtools-performance-timeline-summary');
8888
await summonSearchBox();
89+
// TODO: it should actually wait rendering to finish.
90+
await frontend.evaluate(async () => {
91+
await new Promise(resolve => setTimeout(resolve, 0));
92+
});
8993
await waitFor('.search-bar');
94+
// TODO: it should actually wait rendering to finish.
95+
await frontend.evaluate(async () => {
96+
await new Promise(resolve => setTimeout(resolve, 0));
97+
});
9098
await frontend.keyboard.type(searchEntry);
9199
await frontend.keyboard.press('Tab');
100+
// TODO: it should actually wait rendering to finish.
101+
await frontend.evaluate(async () => {
102+
await new Promise(resolve => setTimeout(resolve, 0));
103+
});
92104
await expectVeEvents([
93105
veKeyDown(''),
94106
veImpressionsUnder('Panel: timeline', [veImpression(

test/e2e/helpers/settings-helpers.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,16 @@ export const openSettingsTab = async (tabTitle: string) => {
5353
// Click on the Settings tab and wait for the panel to appear.
5454
await click(settingsMenuSelector);
5555
await waitFor(panelSelector);
56+
57+
const {frontend} = getBrowserAndPages();
58+
// TODO: it should actually wait rendering to finish.
59+
await frontend.evaluate(async () => {
60+
await new Promise(resolve => setTimeout(resolve, 0));
61+
await new Promise(resolve => setTimeout(resolve, 0));
62+
await new Promise(resolve => setTimeout(resolve, 0));
63+
await new Promise(resolve => setTimeout(resolve, 0));
64+
await new Promise(resolve => setTimeout(resolve, 0));
65+
});
5666
};
5767

5868
export const closeSettings = async () => {

test/e2e/memory/memory_test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,8 @@ describe('The Memory Panel', function() {
576576
assert.isTrue(!(await getCategoryRow('{a, b, c, d, p, q, r}', /* wait:*/ false)));
577577
});
578578

579-
it('Groups objects by constructor location', async () => {
579+
// Flaky with crbug.com/361078921
580+
it.skip('[crbug.com/361078921]: Groups objects by constructor location', async () => {
580581
await goToResource('memory/duplicated-names.html');
581582
await navigateToMemoryTab();
582583
await takeHeapSnapshot();

test/e2e/performance/wasm/performance_profiling_test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ describe('The Performance panel', function() {
132132
});
133133

134134
// Flaky test
135-
it.skipOnPlatforms(
136-
['mac'], '[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the bottom up',
137-
async () => {
135+
it.skip(
136+
'[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the bottom up', async () => {
138137
const {frontend} = getBrowserAndPages();
139138
const expectedActivities = ['mainWasm', 'js-to-wasm::i', '(anonymous)', 'Run microtasks'];
140139

@@ -155,9 +154,8 @@ describe('The Performance panel', function() {
155154
});
156155

157156
// Flaky test
158-
it.skipOnPlatforms(
159-
['mac'], '[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the call tree',
160-
async () => {
157+
it.skip(
158+
'[crbug.com/1510890]: is able to inspect the call stack for a wasm function from the call tree', async () => {
161159
const {frontend} = getBrowserAndPages();
162160
const expectedActivities = [
163161
'Run microtasks',

test/e2e/snippets/snippets_test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,36 @@ describe('Snippet creation', () => {
2828
await openCommandMenu();
2929
await showSnippetsAutocompletion();
3030

31+
// TODO: it should actually wait rendering to finish.
32+
await frontend.evaluate(async () => {
33+
await new Promise(resolve => setTimeout(resolve, 0));
34+
});
35+
3136
assert.deepEqual(await getAvailableSnippets(), [
3237
'New snippet\u200B',
3338
]);
3439

3540
await typeText('New ');
41+
// TODO: it should actually wait rendering to finish.
42+
await frontend.evaluate(async () => {
43+
await new Promise(resolve => setTimeout(resolve, 0));
44+
});
3645
assert.deepEqual(await getAvailableSnippets(), [
3746
'New snippet\u200B',
3847
]);
3948

4049
await typeText('w');
50+
// TODO: it should actually wait rendering to finish.
51+
await frontend.evaluate(async () => {
52+
await new Promise(resolve => setTimeout(resolve, 0));
53+
});
4154
assert.deepEqual(await getAvailableSnippets(), []);
4255

4356
await frontend.keyboard.press('Backspace');
57+
// TODO: it should actually wait rendering to finish.
58+
await frontend.evaluate(async () => {
59+
await new Promise(resolve => setTimeout(resolve, 0));
60+
});
4461
assert.deepEqual(await getAvailableSnippets(), [
4562
'New snippet\u200B',
4663
]);

test/e2e/sources/breakpoint-csp-violations_test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import {assert} from 'chai';
66

7-
import {click, goToResource, waitForAria} from '../../shared/helper.js';
7+
import {click, getBrowserAndPages, goToResource, waitForAria} from '../../shared/helper.js';
88
import {getPausedMessages, openSourcesPanel, PAUSE_ON_UNCAUGHT_EXCEPTION_SELECTOR} from '../helpers/sources-helpers.js';
99

1010
describe('Breakpoints on CSP Violation', () => {
@@ -22,6 +22,11 @@ describe('Breakpoints on CSP Violation', () => {
2222
assert.strictEqual(status1.statusSub, 'Trusted Type Policy Violation');
2323

2424
await click('[aria-label="Resume script execution"]');
25+
// TODO: it should actually wait rendering to finish.
26+
const {frontend} = getBrowserAndPages();
27+
await frontend.evaluate(async () => {
28+
await new Promise(resolve => setTimeout(resolve, 0));
29+
});
2530
const status2 = await getPausedMessages();
2631
assert.strictEqual(status2.statusMain, 'Paused on exception');
2732
assert.strictEqual(

test/e2e/sources/can-open-linear-memory-inspector_test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ describe('Scope View', () => {
131131

132132
// Wait until we pause in the other worker.
133133
await waitFor(PAUSE_INDICATOR_SELECTOR);
134+
// TODO: it should actually wait rendering to finish.
135+
const {frontend} = getBrowserAndPages();
136+
await frontend.evaluate(async () => {
137+
await new Promise(resolve => setTimeout(resolve, 0));
138+
});
134139
const scriptLocation = await retrieveTopCallFrameWithoutResuming();
135140
assert.deepEqual(scriptLocation, 'memory-worker1.rawresponse:10');
136141
});

0 commit comments

Comments
 (0)