Skip to content

Commit 6bd0f34

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
Reenable CoverageListView test
The test flakily failed on a small difference of the screenshot, with what looks like a focus outline (sometimes missing). Therefore, explicitly focus the widget before screenshotting. A first run on the bots doesn't show its flakiness (while a previous run without the fix did) so hopefully this was the culprit. Drive-by: add a scope to the css file Fixed: 450209400 Change-Id: I4067fda553f9a0e01ef1625b1090384e67017e2c Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7234133 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org> Auto-Submit: Kim-Anh Tran <kimanh@chromium.org>
1 parent 2c15b90 commit 6bd0f34

File tree

2 files changed

+61
-59
lines changed

2 files changed

+61
-59
lines changed

front_end/panels/coverage/CoverageListView.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ function makeItem(
3131
}
3232

3333
describeWithEnvironment('CoverageListView', () => {
34-
// Consistently failing, skip while we're fixing it
35-
it.skip('[crbug.com/450209400] basic rendering', async () => {
34+
it('basic rendering', async () => {
3635
const view = new Coverage.CoverageListView.CoverageListView();
3736
renderWidgetInVbox(view);
3837
view.coverageInfo = [
@@ -46,6 +45,7 @@ describeWithEnvironment('CoverageListView', () => {
4645
50),
4746
];
4847
await view.updateComplete;
48+
view.focus();
4949

5050
await assertScreenshot('coverage/basic.png');
5151
});

front_end/panels/coverage/coverageListView.css

Lines changed: 59 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,82 @@
44
* found in the LICENSE file.
55
*/
66

7-
.data-grid {
8-
border: none;
9-
}
10-
11-
.data-grid td .url-outer {
12-
width: 100%;
13-
display: inline-flex;
14-
justify-content: flex-start;
15-
}
16-
17-
.data-grid td .url-outer .filter-highlight {
18-
font-weight: bold;
19-
}
20-
21-
.data-grid td .url-prefix {
22-
overflow-x: hidden;
23-
text-overflow: ellipsis;
24-
}
25-
26-
.data-grid td .url-suffix {
27-
flex: none;
28-
}
7+
@scope to (devtools-widget > *) {
8+
.data-grid {
9+
border: none;
10+
}
2911

30-
.data-grid td .bar {
31-
display: inline-block;
32-
height: 8px;
33-
border: 1px solid transparent;
34-
}
12+
.data-grid td .url-outer {
13+
width: 100%;
14+
display: inline-flex;
15+
justify-content: flex-start;
16+
}
3517

36-
.data-grid td .bar-unused-size {
37-
background-color: var(--app-color-coverage-unused);
38-
}
18+
.data-grid td .url-outer .filter-highlight {
19+
font-weight: bold;
20+
}
3921

40-
.data-grid td .bar-used-size {
41-
background-color: var(--app-color-coverage-used);
42-
}
22+
.data-grid td .url-prefix {
23+
overflow-x: hidden;
24+
text-overflow: ellipsis;
25+
}
4326

44-
.data-grid td .percent-value {
45-
width: 7ex;
46-
display: inline-block;
47-
color: var(--sys-color-on-surface-subtle);
48-
}
27+
.data-grid td .url-suffix {
28+
flex: none;
29+
}
4930

50-
@media (forced-colors: active) {
51-
.data-grid td .bar-container {
52-
forced-color-adjust: none;
31+
.data-grid td .bar {
32+
display: inline-block;
33+
height: 8px;
34+
border: 1px solid transparent;
5335
}
5436

5537
.data-grid td .bar-unused-size {
56-
background-color: ButtonText;
38+
background-color: var(--app-color-coverage-unused);
5739
}
5840

5941
.data-grid td .bar-used-size {
60-
background-color: ButtonFace;
42+
background-color: var(--app-color-coverage-used);
6143
}
6244

63-
.data-grid td .bar {
64-
border-color: ButtonText;
45+
.data-grid td .percent-value {
46+
width: 7ex;
47+
display: inline-block;
48+
color: var(--sys-color-on-surface-subtle);
6549
}
6650

67-
.data-grid .selected td .bar {
68-
border-top-color: HighlightText;
69-
border-bottom-color: HighlightText;
70-
}
51+
@media (forced-colors: active) {
52+
.data-grid td .bar-container {
53+
forced-color-adjust: none;
54+
}
7155

72-
.data-grid .selected td .bar:last-child {
73-
border-right-color: HighlightText;
74-
}
56+
.data-grid td .bar-unused-size {
57+
background-color: ButtonText;
58+
}
7559

76-
.data-grid .selected td .bar:first-child {
77-
border-left-color: HighlightText;
78-
}
60+
.data-grid td .bar-used-size {
61+
background-color: ButtonFace;
62+
}
63+
64+
.data-grid td .bar {
65+
border-color: ButtonText;
66+
}
67+
68+
.data-grid .selected td .bar {
69+
border-top-color: HighlightText;
70+
border-bottom-color: HighlightText;
71+
}
72+
73+
.data-grid .selected td .bar:last-child {
74+
border-right-color: HighlightText;
75+
}
76+
77+
.data-grid .selected td .bar:first-child {
78+
border-left-color: HighlightText;
79+
}
7980

80-
.data-grid:focus tr.selected span.percent-value {
81-
color: HighlightText;
81+
.data-grid:focus tr.selected span.percent-value {
82+
color: HighlightText;
83+
}
8284
}
8385
}

0 commit comments

Comments
 (0)