Skip to content

Commit 3a2235b

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
Re-enable can-disable-auto-sources-focus.test.ts
Previously this test used the elements panel to showcase a behavior which is independent of the elements panel. However, the elements panel showed flaking VE events, so with this CL we just switch to using the console for showcasing the behavior instead. Fixed: 416405487 Change-Id: I637863635eea0642ec90c0165cc76ebdcf1ae27a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7237935 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
1 parent 6bd0f34 commit 3a2235b

File tree

1 file changed

+19
-24
lines changed

1 file changed

+19
-24
lines changed

test/e2e/sources/can-disable-auto-sources-focus.test.ts

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5-
import {navigateToElementsTab} from '../helpers/elements-helpers.js';
5+
import {navigateToConsoleTab} from '../helpers/console-helpers.js';
66
import {togglePreferenceInSettingsTab} from '../helpers/settings-helpers.js';
77
import {addBreakpointForLine, DEBUGGER_PAUSED_EVENT, openSourceCodeEditorForFile} from '../helpers/sources-helpers.js';
88
import type {DevToolsPage} from '../shared/frontend-helper.js';
@@ -14,7 +14,7 @@ async function breakAndCheckFocusedPanel(
1414

1515
await addBreakpointForLine(4, devToolsPage);
1616

17-
await navigateToElementsTab(devToolsPage);
17+
await navigateToConsoleTab(devToolsPage);
1818

1919
void inspectedPage.evaluate('f2();');
2020

@@ -24,26 +24,21 @@ async function breakAndCheckFocusedPanel(
2424
}
2525

2626
describe('Sources Panel', () => {
27-
// Flaky VE events
28-
it.skip(
29-
'[crbug.com/416405487] is not opened on Debugger.paused if autoFocusOnDebuggerPausedEnabled is false',
30-
async ({devToolsPage, inspectedPage}) => {
31-
await devToolsPage.installEventListener(DEBUGGER_PAUSED_EVENT);
32-
await togglePreferenceInSettingsTab(
33-
'Focus Sources panel when triggering a breakpoint', undefined, devToolsPage);
34-
35-
// Note: This test checks if we *do not* switch panels after receiving
36-
// a Debugger.paused event. If this functionality that we are testing is not
37-
// working anymore, then this test may become flaky (sometimes we check before switching,
38-
// sometimes after switching to the sources panel).
39-
await breakAndCheckFocusedPanel('elements', devToolsPage, inspectedPage);
40-
});
41-
42-
// Flaky VE events
43-
it.skip(
44-
'[crbug.com/416405487] is opened on Debugger.pause if autoFocusOnDebuggerPausedEnabled is true (default)',
45-
async ({devToolsPage, inspectedPage}) => {
46-
await devToolsPage.installEventListener(DEBUGGER_PAUSED_EVENT);
47-
await breakAndCheckFocusedPanel('sources', devToolsPage, inspectedPage);
48-
});
27+
it('is not opened on Debugger.paused if autoFocusOnDebuggerPausedEnabled is false',
28+
async ({devToolsPage, inspectedPage}) => {
29+
await devToolsPage.installEventListener(DEBUGGER_PAUSED_EVENT);
30+
await togglePreferenceInSettingsTab('Focus Sources panel when triggering a breakpoint', undefined, devToolsPage);
31+
32+
// Note: This test checks if we *do not* switch panels after receiving
33+
// a Debugger.paused event. If this functionality that we are testing is not
34+
// working anymore, then this test may become flaky (sometimes we check before switching,
35+
// sometimes after switching to the sources panel).
36+
await breakAndCheckFocusedPanel('console', devToolsPage, inspectedPage);
37+
});
38+
39+
it('is opened on Debugger.pause if autoFocusOnDebuggerPausedEnabled is true (default)',
40+
async ({devToolsPage, inspectedPage}) => {
41+
await devToolsPage.installEventListener(DEBUGGER_PAUSED_EVENT);
42+
await breakAndCheckFocusedPanel('sources', devToolsPage, inspectedPage);
43+
});
4944
});

0 commit comments

Comments
 (0)