web-platform-tests / interop

web-platform-tests Interop project
https://wpt.fyi/interop
278 stars 28 forks source link

Fix `moveToDocument` in `pointerevents/pointerevent_support.js` to conform to WebDriver spec #601

Closed masayuki-nakano closed 9 months ago

masayuki-nakano commented 10 months ago

Test List

The file is imported by the following tests: https://searchfox.org/mozilla-central/search?q=pointerevent_support.js&path=testing%2Fweb-platform%2Ftests%2Fpointerevents&case=false&regexp=false

Mainly, I'd like to change this for fixing this failure: https://wpt.fyi/results/pointerevents/pointerevent_attributes_hoverable_pointers.html%3Fmouse?label=master&label=experimental&aligned

Rationale

https://github.com/w3c/webdriver/issues/1545

pointerMove(0, 0) has a special meaning, the pointer position in the document should be initialized as (0, 0) by default and if pointerMove(0, 0) is called, WebDriver should do nothing.

foolip commented 10 months ago

@flackr can you review this for Chromium?

foolip commented 10 months ago

If (0, 0) is special, could the tests avoid the behavior by using (1, 1) or something?

masayuki-nakano commented 9 months ago

If (0, 0) is special, could the tests avoid the behavior by using (1, 1) or something?

Yeah, therfore, I suggested the PR which moves the pointer to (1, 1) first, then, move it to (0,0) again to keep the expected result after a call of the utility function.