RESOLVED FIXED 216933
Pause is needed while simulating mouse actions
https://bugs.webkit.org/show_bug.cgi?id=216933
Summary Pause is needed while simulating mouse actions
cathiechen
Reported 2020-09-24 10:01:05 PDT
Test code like below would not work if pause is not supported. test_driver.Actions() .addPointer("pointer1", "mouse") .pointerMove(0, 0, { origin: target }) .pointerDown() .pointerMove(originpos.x, originpos.y, { origin: target }) .pointerMove(originpos.x + delta.x / 2, originpos.y + delta.y / 2, { origin: target }) .pointerMove(originpos.x + delta.x, originpos.y + delta.y, { origin: target }) .pause(duriation) .pointerUp() .send();
Attachments
Patch (2.50 KB, patch)
2020-09-24 10:04 PDT, cathiechen
no flags
Patch (4.97 KB, patch)
2020-09-25 11:40 PDT, cathiechen
no flags
Patch (4.86 KB, patch)
2020-09-27 03:56 PDT, cathiechen
no flags
Patch (4.85 KB, patch)
2020-09-27 04:10 PDT, cathiechen
no flags
cathiechen
Comment 1 2020-09-24 10:04:11 PDT
EWS Watchlist
Comment 2 2020-09-24 10:04:43 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Blaze Burg
Comment 3 2020-09-24 14:16:37 PDT
Comment on attachment 409589 [details] Patch This seems to have regressed a few tests according to EWS. Please investigate.
cathiechen
Comment 4 2020-09-25 11:40:02 PDT
cathiechen
Comment 5 2020-09-25 16:03:44 PDT
(In reply to Brian Burg from comment #3) > Comment on attachment 409589 [details] > Patch > > This seems to have regressed a few tests according to EWS. Please > investigate. Done! Thanks
Darin Adler
Comment 6 2020-09-26 16:03:09 PDT
Comment on attachment 409713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409713&action=review > LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:10 > +// Provide an imprecise way of pause. This comment is not grammatically correct and it’s also unclear. I suppose it’s saying that there is something wrong with the implementation, but what? I suggest omitting the comment, or we could include it if we can pinpoint *what* we are trying to say and find a good way to word it. Is there something wrong with using setTimeout to pause? If so, what is it? Is there a problem with precision of the duration? Or is the problem that a timeout is queued behind other operations or on the wrong run loop? Maybe there is nothing wrong! > LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:50 > + // FIXME: Provide a precise way of pause. Same thing here. Please just remove this comment or if you like I can try to help write one for whatever we mean here.
cathiechen
Comment 7 2020-09-27 03:53:05 PDT
Comment on attachment 409713 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=409713&action=review >> LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:10 >> +// Provide an imprecise way of pause. > > This comment is not grammatically correct and it’s also unclear. I suppose it’s saying that there is something wrong with the implementation, but what? I suggest omitting the comment, or we could include it if we can pinpoint *what* we are trying to say and find a good way to word it. > > Is there something wrong with using setTimeout to pause? If so, what is it? Is there a problem with precision of the duration? Or is the problem that a timeout is queued behind other operations or on the wrong run loop? Maybe there is nothing wrong! Thanks! I'll remove them. Yeah, looks like nothing is wrong. I added the comments because setTimeout seems not as precise as the pause in dispatchTouchActions.
cathiechen
Comment 8 2020-09-27 03:56:23 PDT
cathiechen
Comment 9 2020-09-27 04:10:23 PDT
EWS
Comment 10 2020-09-27 05:56:02 PDT
Committed r267656: <https://trac.webkit.org/changeset/267656> All reviewed patches have been landed. Closing bug and clearing flags on attachment 409825 [details].
Radar WebKit Bug Importer
Comment 11 2020-09-27 05:57:17 PDT
Note You need to log in before you can comment on or make changes to this bug.