summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/touchadjustment
diff options
context:
space:
mode:
authortdanderson@chromium.org <tdanderson@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-31 22:10:57 +0000
committertdanderson@chromium.org <tdanderson@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-31 22:10:57 +0000
commitb2363032397b1c0f74945c7b927b43fe316f991b (patch)
tree76062758999fec533e4b8658137372603b0ce539 /third_party/WebKit/LayoutTests/touchadjustment
parent306ea549a828ecf1efc394c8871663d57dce02d5 (diff)
downloadchromium_src-b2363032397b1c0f74945c7b927b43fe316f991b.zip
chromium_src-b2363032397b1c0f74945c7b927b43fe316f991b.tar.gz
chromium_src-b2363032397b1c0f74945c7b927b43fe316f991b.tar.bz2
[touchadjustment] touch-links-two-finger-tap test pass incorrectly
https://bugs.webkit.org/show_bug.cgi?id=100619 Reviewed by Antonio Gomes. Tools: Store the touch area when sending a GestureTwoFingerTap event. * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: (WebTestRunner): (WebTestRunner::EventSender::gestureEvent): LayoutTests: Make use of the gesture's touch area when testing the correct targeting of elements. * touchadjustment/touch-links-two-finger-tap.html: git-svn-id: svn://svn.chromium.org/blink/trunk@133082 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/touchadjustment')
-rw-r--r--third_party/WebKit/LayoutTests/touchadjustment/touch-links-two-finger-tap.html17
1 files changed, 16 insertions, 1 deletions
diff --git a/third_party/WebKit/LayoutTests/touchadjustment/touch-links-two-finger-tap.html b/third_party/WebKit/LayoutTests/touchadjustment/touch-links-two-finger-tap.html
index 4ae9b8f..ff629ad 100644
--- a/third_party/WebKit/LayoutTests/touchadjustment/touch-links-two-finger-tap.html
+++ b/third_party/WebKit/LayoutTests/touchadjustment/touch-links-two-finger-tap.html
@@ -36,7 +36,7 @@
function testTwoFingerTap(touchpoint)
{
if (eventSender.gestureTwoFingerTap)
- eventSender.gestureTwoFingerTap(touchpoint.left, touchpoint.top);
+ eventSender.gestureTwoFingerTap(touchpoint.x, touchpoint.y, touchpoint.width, touchpoint.height);
else
debug("gestureTwoFingerTap not implemented by this platform.");
}
@@ -45,6 +45,8 @@
{
// Touch directly in the center of the element.
var touchpoint = offsetTouchPoint(findAbsoluteBounds(element), 'center', 0, 20, 30);
+ if (document.elementFromPoint(touchpoint.x, touchpoint.y) != element)
+ testFailed('Direct touch ended up on some other element');
testTwoFingerTap(touchpoint);
}
@@ -52,9 +54,22 @@
{
// Touch just right of the element.
var touchpoint = offsetTouchPoint(findAbsoluteBounds(element), 'right', 10, 30, 20);
+ if (isDescendantOf(element, document.elementFromPoint(touchpoint.x, touchpoint.y)))
+ testFailed('Indirect touch ended up still on top of the element');
testTwoFingerTap(touchpoint);
}
+ function isDescendantOf(parent, child)
+ {
+ var n = child;
+ while (n) {
+ if (n == parent)
+ return true;
+ n = n.parentNode;
+ }
+ return false;
+ }
+
function testDirectTouches()
{
debug('Testing direct hits.');