Skip to content

Commit 7138408

Browse files
Samiya CaurDevtools-frontend LUCI CQ
authored andcommitted
Enabling skipped can override headers via network panel test
clicking on element and using pasteText is not reliable, so I have instead updated code to set textContent explicitly Keeping the bug open for monitoring Bug: 421131932 Change-Id: I15dbffb3a394e59114c8e8e195261a3ed47899ec Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6606540 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Samiya Caur <samiyac@chromium.org> Commit-Queue: Samiya Caur <samiyac@chromium.org>
1 parent 0aba259 commit 7138408

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/e2e/sources/header-overrides_test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
click,
1111
getBrowserAndPages,
1212
goToResource,
13-
pasteText,
1413
pressKey,
1514
typeText,
1615
waitFor,
@@ -86,7 +85,10 @@ async function fileTreeEntryIsSelectedAndHasPurpleDot(): Promise<boolean> {
8685
async function editHeaderItem(newValue: string, previousValue: string): Promise<void> {
8786
let focusedTextContent = await activeElementTextContent();
8887
assert.strictEqual(focusedTextContent, previousValue);
89-
await pasteText(newValue);
88+
const element = await activeElement();
89+
await element.evaluate((e, value) => {
90+
e.textContent = value;
91+
}, newValue);
9092
focusedTextContent = await activeElementTextContent();
9193
assert.strictEqual(focusedTextContent, newValue);
9294
await pressKey('Tab');
@@ -119,8 +121,7 @@ describe('The Overrides Panel', function() {
119121
assert.deepEqual(await getTextFromHeadersRow(row), ['aaa', 'bbb']);
120122
});
121123

122-
// Regularly failing on CI.
123-
it.skip('[crbug.com/421131932] can override headers via network panel', async () => {
124+
it('can override headers via network panel', async () => {
124125
const {frontend} = getBrowserAndPages();
125126
await frontend.emulateMediaFeatures([
126127
{name: 'prefers-reduced-motion', value: 'reduce'},

0 commit comments

Comments
 (0)