Commit fd63da56 authored by nzolghadr's avatar nzolghadr Committed by Commit bot

Move auxclick wpt test and add automation

Move auxclick manual test under uievent
in wpt as the spec got merged into UIEvent
spec. Also add the test automation.
Currently it seems that the double click
is not fully functional in GPU benchmarking.

BUG=716164

Review-Url: https://codereview.chromium.org/2851633002
Cr-Commit-Position: refs/heads/master@{#468177}
parent 5276c883
...@@ -234,7 +234,6 @@ virtual/sharedarraybuffer/webaudio/codec-tests/aac [ WontFix ] ...@@ -234,7 +234,6 @@ virtual/sharedarraybuffer/webaudio/codec-tests/aac [ WontFix ]
# WPT subdirectories without owners. # WPT subdirectories without owners.
external/wpt/accelerometer [ WontFix ] external/wpt/accelerometer [ WontFix ]
external/wpt/assumptions [ WontFix ] external/wpt/assumptions [ WontFix ]
external/wpt/auxclick [ WontFix ]
external/wpt/clear-site-data [ WontFix ] external/wpt/clear-site-data [ WontFix ]
external/wpt/css-values [ WontFix ] external/wpt/css-values [ WontFix ]
external/wpt/gyroscope [ WontFix ] external/wpt/gyroscope [ WontFix ]
......
This is a testharness.js-based test.
FAIL auxclick event sequence received. assert_equals: detail attribute of auxclick should be the click count. expected 2 but got 1
PASS PointerEvent Automation
PASS First auxclick should have detail=1 indicating the fire click
FAIL Second auxclick should have detail=2 indicating the fire click assert_equals: detail attribute of auxclick should be the click count. expected 2 but got 1
Harness: the test ran to completion.
...@@ -97,10 +97,13 @@ function mouseChordedButtonPress(targetSelector) { ...@@ -97,10 +97,13 @@ function mouseChordedButtonPress(targetSelector) {
}); });
} }
function mouseClickInTarget(targetSelector, targetFrame) { function mouseClickInTarget(targetSelector, targetFrame, button) {
var targetDocument = document; var targetDocument = document;
var frameLeft = 0; var frameLeft = 0;
var frameTop = 0; var frameTop = 0;
if (button === undefined) {
button = 'left';
}
if (targetFrame !== undefined) { if (targetFrame !== undefined) {
targetDocument = targetFrame.contentDocument; targetDocument = targetFrame.contentDocument;
var frameRect = targetFrame.getBoundingClientRect(); var frameRect = targetFrame.getBoundingClientRect();
...@@ -119,8 +122,8 @@ function mouseClickInTarget(targetSelector, targetFrame) { ...@@ -119,8 +122,8 @@ function mouseClickInTarget(targetSelector, targetFrame) {
source: 'mouse', source: 'mouse',
actions: [ actions: [
{name: 'pointerMove', x: xPosition, y: yPosition}, {name: 'pointerMove', x: xPosition, y: yPosition},
{name: 'pointerDown', x: xPosition, y: yPosition}, {name: 'pointerDown', x: xPosition, y: yPosition, button: button},
{name: 'pointerUp'} {name: 'pointerUp', button: button}
] ]
}], }],
resolve); resolve);
......
importAutomationScript('/pointerevents/pointerevent_common_input.js');
function inject_input() {
return mouseClickInTarget('#target', undefined, 'middle').then(function() {
return mouseClickInTarget('#target', undefined, 'middle');
});
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment