| Index: third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js b/third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js
|
| index 113036f4e7f20d26a3d62df953cb4b67a273c37c..ad3e89746b60aca9ff6953291dcaa002fe49d007 100644
|
| --- a/third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt_automation/pointerevents/pointerevent_common_input.js
|
| @@ -130,9 +130,12 @@ function mouseClickInTarget(targetSelector, targetFrame) {
|
| });
|
| }
|
|
|
| -function mouseDragInTargets(targetSelectorList) {
|
| +function mouseDragInTargets(targetSelectorList, button) {
|
| return new Promise(function(resolve, reject) {
|
| if (window.chrome && chrome.gpuBenchmarking) {
|
| + if (button === undefined) {
|
| + button = 'left';
|
| + }
|
| scrollPageIfNeeded(targetSelectorList[0], document);
|
| var target = document.querySelector(targetSelectorList[0]);
|
| var targetRect = target.getBoundingClientRect();
|
| @@ -142,7 +145,7 @@ function mouseDragInTargets(targetSelectorList) {
|
| var pointerAction = pointerActions[0];
|
| pointerAction.actions = [];
|
| pointerAction.actions.push(
|
| - {name: 'pointerDown', x: xPosition, y: yPosition});
|
| + {name: 'pointerDown', x: xPosition, y: yPosition, button: button});
|
| for (var i = 1; i < targetSelectorList.length; i++) {
|
| scrollPageIfNeeded(targetSelectorList[i], document);
|
| target = document.querySelector(targetSelectorList[i]);
|
| @@ -150,9 +153,9 @@ function mouseDragInTargets(targetSelectorList) {
|
| xPosition = targetRect.left + boundaryOffset;
|
| yPosition = targetRect.top + boundaryOffset;
|
| pointerAction.actions.push(
|
| - {name: 'pointerMove', x: xPosition, y: yPosition});
|
| + {name: 'pointerMove', x: xPosition, y: yPosition, button: button});
|
| }
|
| - pointerAction.actions.push({name: 'pointerUp'});
|
| + pointerAction.actions.push({name: 'pointerUp', button: button});
|
| chrome.gpuBenchmarking.pointerActionSequence(pointerActions, resolve);
|
| } else {
|
| reject();
|
|
|