Closed Bug 1841328 Opened 2 years ago Closed 2 years ago

WPT failure in css/css-grid/parsing/grid-template-shorthand-valid.html due to serialization difference

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: twisniewski, Unassigned)

References

(Blocks 1 open bug, )

Details

We are presently failing just one of the WPTs in https://wpt.fyi/results/css/css-grid/parsing/grid-template-shorthand-valid.html :

e.style['grid-template'] = ""a" auto [a] "b" auto [b] / 10px" should set the property value

The failure says:

assert_equals: serialization should be canonical
expected
  "\"a\" auto [a] \"b\" auto [b] / 10px"
but got
  "\"a\" [a] \"b\" [b] / 10px"

WebKit fails in the exact same way. This might be a case where the test is wrong; we need to dig in and check which serialization is more sensible. Ours is definitely shorter, FWIW.

Reduced testcase (where Firefox produces a shorter alert()'ed serialization in getComputedStyle):

data:text/html,<div id=foo style='grid-template: "a" auto [a] "b" auto [b] / 10px'></div><script>alert(getComputedStyle(foo).gridTemplate)</script>

Firefox and Chrome each remain consistent if I swap out the specified value for the shorter serialization "a" [a] "b" [b] / 10px from our alert message, FWIW:

data:text/html,<div id=foo style='grid-template: "a" [a] "b" [b] / 10px'></div><script>alert(getComputedStyle(foo).gridTemplate)</script>

We still alert "a" [a] "b" [b] / 10px, and Chrome still alerts auto [a] auto [b] / 10px / "a" "b". So: we're all in agreement that these serializations are equivalent; it's just a question of which one the test should be expecting as canonical.

Severity: -- → S3
Summary: WPT failure in css/css-grid/parsing/grid-template-shorthand-valid.html → WPT failure in css/css-grid/parsing/grid-template-shorthand-valid.html due to serialization difference

I guess someone fixed this bug already. Looks like we pass this test in wpt.fyi.

(In reply to Boris Chiou [:boris] from comment #2)

I guess someone fixed this bug already. Looks like we pass this test in wpt.fyi.

OK. Looks like https://github.com/web-platform-tests/wpt/pull/41869 fixed this test.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.