Skip to content

Commit 0344c6f

Browse files
committed
css-exclusions: Add assert_implements to avoid false positives.
css-exclusions <https://drafts.csswg.org/css-exclusions/> is nowadays deprecated and usupported by all the major browsers. However, some subtests in this directory still pass because they do not check whether the CSS property is supported before running. As a result, the directory ends up with a misleading score of 30/54. Fix that by adding the required `assert_implements` checks.
1 parent b01dc7a commit 0344c6f

7 files changed

+22
-14
lines changed

css/css-exclusions/wrap-flow-001.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<div id="log"></div>
4242

4343
<script type="text/javascript">
44-
setup({ explicit_done: true });
45-
44+
setup(() => {
45+
assert_implements(CSS.supports('wrap-flow', 'clear'), "'wrap-flow: clear'");
46+
}, {explicit_done: true});
4647
document.fonts.ready.then(() => {
4748
test(function() {assert_equals(checkLinePos("linesBelow",150,"top"), true)}, "Verify top of the 'linesBelow' span is positioned correctly");
4849
done();

css/css-exclusions/wrap-flow-002.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
<div id="log"></div>
4545

4646
<script type="text/javascript">
47-
setup({ explicit_done: true });
48-
47+
setup(() => {
48+
assert_implements(CSS.supports('wrap-flow', 'start'), "'wrap-flow: start'");
49+
}, {explicit_done: true});
4950
document.fonts.ready.then(() => {
5051
test(function() {assert_equals(checkLinePos("lineLeft1",36,"top"), true)}, "Verify top of the 'lineLeft1' span is positioned correctly");
5152
test(function() {assert_equals(checkLinePos("lineLeft2",48,"top"), true)}, "Verify top of the 'lineLeft2' span is positioned correctly");

css/css-exclusions/wrap-flow-003.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
<div id="log"></div>
4545

4646
<script type="text/javascript">
47-
setup({ explicit_done: true });
48-
47+
setup(() => {
48+
assert_implements(CSS.supports('wrap-flow', 'auto'), "'wrap-flow: auto'");
49+
}, {explicit_done: true});
4950
document.fonts.ready.then(() => {
5051
test(function() {assert_equals(checkLinePos("line1",216,"right"), true)}, "Verify right of the 'line1' span is positioned correctly");
5152
test(function() {assert_equals(checkLinePos("line2",192,"right"), true)}, "Verify right of the 'line2' span is positioned correctly");

css/css-exclusions/wrap-flow-004.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
<div id="log"></div>
4646

4747
<script type="text/javascript">
48-
setup({ explicit_done: true });
49-
48+
setup(() => {
49+
assert_implements(CSS.supports('wrap-flow', 'both'), "'wrap-flow: both'");
50+
}, {explicit_done: true});
5051
document.fonts.ready.then(() => {
5152
/* Line 1 */
5253
test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the 'line1' span is positioned correctly");

css/css-exclusions/wrap-flow-005.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@
4545
<div id="log"></div>
4646

4747
<script type="text/javascript">
48-
setup({ explicit_done: true });
49-
48+
setup(() => {
49+
assert_implements(CSS.supports('wrap-flow', 'end'), "'wrap-flow: end'");
50+
}, {explicit_done: true});
5051
document.fonts.ready.then(() => {
5152
/* Line 1 */
5253
test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the 'line1' span is positioned correctly");

css/css-exclusions/wrap-flow-006.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
<div id="log"></div>
4545

4646
<script type="text/javascript">
47-
setup({ explicit_done: true });
48-
47+
setup(() => {
48+
assert_implements(CSS.supports('wrap-flow', 'maximum'), "'wrap-flow: maximum'");
49+
}, {explicit_done: true});
4950
document.fonts.ready.then(() => {
5051
/*Line 1*/
5152
test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the 'line1' span is positioned correctly");

css/css-exclusions/wrap-through-001.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,10 @@
5151
<div id="log"></div>
5252

5353
<script type="text/javascript">
54-
setup({ explicit_done: true });
55-
54+
setup(() => {
55+
assert_implements(CSS.supports('wrap-through', 'none'), "'wrap-through: none'");
56+
assert_implements(CSS.supports('wrap-flow', 'both'), "'wrap-flow: both'");
57+
}, {explicit_done: true});
5658
document.fonts.ready.then(() => {
5759
/* Line 1 */
5860
test(function() {assert_equals(checkLinePos("line1",0,"top"), true)}, "Verify top of the first line above the exclusion");

0 commit comments

Comments
 (0)