summaryrefslogtreecommitdiffstats
path: root/layout/generic/test/selection_cross_shadow_boundary_helper.js
blob: b2a596a27f3b521c54c89ec1942861160534457b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Helper file for test_selection_cross_shadow_boundary_* related tests

function drag(
  fromTarget,
  fromX,
  fromY,
  toTarget,
  toX,
  toY,
  withAccelKey = false
) {
  synthesizeMouse(fromTarget, fromX, fromY, {
    type: "mousemove",
    accelKey: withAccelKey,
  });
  synthesizeMouse(fromTarget, fromX, fromY, {
    type: "mousedown",
    accelKey: withAccelKey,
  });
  synthesizeMouse(toTarget, toX, toY, {
    type: "mousemove",
    accelKey: withAccelKey,
  });
  synthesizeMouse(toTarget, toX, toY, {
    type: "mouseup",
    accelKey: withAccelKey,
  });
}