web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
5.03k stars 3.13k forks source link

OffscreenCanvas size.attributes.parse.empty test is not valid #19181

Open Cwiiis opened 5 years ago

Cwiiis commented 5 years ago

This test tests that setting width or height to an empty string has no effect, but I don't believe this is a valid reading of the spec. The width and height properties are unsigned longs - An empty string is equivalent to +0 according to the spec https://tc39.es/ecma262/#sec-tonumber and the OffscreenCanvas spec makes no mention (that I see) of 0 being an invalid value for width or height. As far as I can tell, a correct implementation of OffscreenCanvas would fail this test.

zcorpan commented 5 years ago

The test is offscreen-canvas/the-offscreen-canvas/size.attributes.parse.empty.html?

cc @xidachen

Cwiiis commented 5 years ago

The test is offscreen-canvas/the-offscreen-canvas/size.attributes.parse.empty.html?

That's correct.