mousemove_prevent_default_action.tentative.html
unnecessarily listens for selectionchange
events when asserting dragstart
is fired
#576
Labels
focus area: Pointer and Mouse Events
test-change-proposal
Proposal to add or remove tests for an interop area
Test List
https://wpt.fyi/results/uievents/mouse/mousemove_prevent_default_action.tentative.html
Rationale
The second subtest in the
mousemove_prevent_default_action.tentative.html
WPT asserts that a cancelledmousemove
event fires adragstart
, which is a fine expectation on its own. Unfortunately, since this behavior is asserted by comparing the logged events (obtained from respective event listeners) against a static set of expected events (["mousemove", "mousedown", "mousemove", "dragstart"]
), the test may listen toselectionchange
events and include anyselectionchange
events in the test assertion, producing an unnecessary test failure.We should not care whether or not a
selectionchange
event was fired in this case, since we only want to assert that adragstart
event fires from a cancelledmousemove
event on adraggable
element. These two events are not mutually exclusive in any manner relevant to this WPT.In fact, the same argument also applies for not listening to
dragstart
events when we only want to assert that aselectionchange
event was fired.We should only be listening for
selectionchange
events, and not alsodragstart
events, in the first subtest. Similarly, we should only be listening fordragstart
events, and not alsoselectionchange
events, in the second subtest.The text was updated successfully, but these errors were encountered: