Skip to content

Commit b75d472

Browse files
Ana Sollano KimDevtools-frontend LUCI CQ
authored andcommitted
Re-enabling DisallowedOptGroupChild-related tests
Tests related to the issue type `DisallowedOptGroupChild` started to fail, most likely due to the enablement of InputClosesSelect by default in crrev.com/c/chromium/src/+/6257633. Since the resource select-element-accessibility-issue-DisallowedOptGroupChild.html used an `<input />` to trigger the issue, this CL just changes it to a `<button>` and re-enables both tests. Bug: 396633671 Change-Id: Id1ed99129f99b606bd6daa20a6047dbef3cce8e8 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6289171 Reviewed-by: Alex Rudenko <[email protected]> Commit-Queue: Alex Rudenko <[email protected]> Reviewed-by: Changhao Han <[email protected]>
1 parent 2f393a7 commit b75d472

File tree

3 files changed

+24
-30
lines changed

3 files changed

+24
-30
lines changed

test/e2e/host/user-metrics_test.ts

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -534,20 +534,17 @@ describe('User Metrics for Issue Panel', () => {
534534
]);
535535
});
536536

537-
// crbug.com/396633671 failing with latest Cft roll
538-
it.skip(
539-
'[crbug.com/396633671] dispatches an event when a SelectElementAccessibility DisallowedOptGroupChild issue is created',
540-
async () => {
541-
await goToResource('issues/select-element-accessibility-issue-DisallowedOptGroupChild.html');
542-
await waitFor('.issue');
543-
544-
await assertHistogramEventsInclude([
545-
{
546-
actionName: 'DevTools.IssueCreated',
547-
actionCode: 87, // SelectElementAccessibilityIssue::DisallowedOptGroupChild
548-
},
549-
]);
550-
});
537+
it('dispatches an event when a SelectElementAccessibility DisallowedOptGroupChild issue is created', async () => {
538+
await goToResource('issues/select-element-accessibility-issue-DisallowedOptGroupChild.html');
539+
await waitFor('.issue');
540+
541+
await assertHistogramEventsInclude([
542+
{
543+
actionName: 'DevTools.IssueCreated',
544+
actionCode: 87, // SelectElementAccessibilityIssue::DisallowedOptGroupChild
545+
},
546+
]);
547+
});
551548

552549
it('dispatches an event when a SelectElementAccessibility NonPhrasingContentOptionChild issue is created',
553550
async () => {

test/e2e/issues/select-element-accessibility-issues_test.ts

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,19 @@ describe('Select element accessibility issues test', () => {
2626
await waitForTableFromResourceSectionContents(section.content, expectedTableRows);
2727
});
2828

29-
// crbug.com/396633671 failing with latest Cft roll
30-
it.skip(
31-
'[crbug.com/396633671] should display issue when there is a disallowed child of an optgroup element',
32-
async () => {
33-
await goToResource('issues/select-element-accessibility-issue-DisallowedOptGroupChild.html');
34-
await navigateToIssuesTab();
35-
const issueElement = await getAndExpandSpecificIssueByTitle('Invalid element or text node within <optgroup>');
36-
assertNotNullOrUndefined(issueElement);
29+
it('should display issue when there is a disallowed child of an optgroup element', async () => {
30+
await goToResource('issues/select-element-accessibility-issue-DisallowedOptGroupChild.html');
31+
await navigateToIssuesTab();
32+
const issueElement = await getAndExpandSpecificIssueByTitle('Invalid element or text node within <optgroup>');
33+
assertNotNullOrUndefined(issueElement);
3734

38-
const section = await getResourcesElement('1 element', issueElement);
39-
await ensureResourceSectionIsExpanded(section);
40-
const expectedTableRows = [
41-
['Disallowed descendant'],
42-
];
43-
await waitForTableFromResourceSectionContents(section.content, expectedTableRows);
44-
});
35+
const section = await getResourcesElement('1 element', issueElement);
36+
await ensureResourceSectionIsExpanded(section);
37+
const expectedTableRows = [
38+
['Disallowed descendant'],
39+
];
40+
await waitForTableFromResourceSectionContents(section.content, expectedTableRows);
41+
});
4542

4643
it('should display issue when there is a non-phrasing child element of an option element', async () => {
4744
await goToResource('issues/select-element-accessibility-issue-NonPhrasingContentOptionChild.html');

test/e2e/resources/issues/select-element-accessibility-issue-DisallowedOptGroupChild.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<select>
1212
<optgroup>
1313
<option>..</option>
14-
<input/>
14+
<button></button>
1515
</optgroup>
1616
</select>
1717
</body>

0 commit comments

Comments
 (0)