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 tests don't take into account [EnforceRange] #19180

Open Cwiiis opened 5 years ago

Cwiiis commented 5 years ago

The width and height attributes of an OffscreenCanvas are declared with [EnforceRange] in the spec: https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas

This means that setting them to values outside of the range of an unsigned long should throw a TypeError - at least the test offscreen-canvas/the-offscreen-canvas/size.attributes.parse.minus.html assumes that you can just set a value that's out of range and expect no exception to occur, so this test will fail for correct implementations of OffscreenCanvas. I believe other size.attributes tests in the same directory may also be affected.

zcorpan commented 5 years ago

cc @xidachen