diff options
author | tdanderson@chromium.org <tdanderson@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-10-31 22:10:57 +0000 |
---|---|---|
committer | tdanderson@chromium.org <tdanderson@chromium.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-10-31 22:10:57 +0000 |
commit | b2363032397b1c0f74945c7b927b43fe316f991b (patch) | |
tree | 76062758999fec533e4b8658137372603b0ce539 | |
parent | 306ea549a828ecf1efc394c8871663d57dce02d5 (diff) | |
download | chromium_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
4 files changed, 44 insertions, 1 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog index ce555fa..3e16901 100644 --- a/third_party/WebKit/LayoutTests/ChangeLog +++ b/third_party/WebKit/LayoutTests/ChangeLog @@ -1,3 +1,14 @@ +2012-10-31 Terry Anderson <tdanderson@chromium.org> + + [touchadjustment] touch-links-two-finger-tap test pass incorrectly + https://bugs.webkit.org/show_bug.cgi?id=100619 + + Reviewed by Antonio Gomes. + + Make use of the gesture's touch area when testing the correct targeting of elements. + + * touchadjustment/touch-links-two-finger-tap.html: + 2012-10-31 Stephen White <senorblanco@chromium.org> [Chromium] Unreviewed gardening. More flaky fallout from 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.'); diff --git a/third_party/WebKit/Tools/ChangeLog b/third_party/WebKit/Tools/ChangeLog index 277c47b..cd44e82 100644 --- a/third_party/WebKit/Tools/ChangeLog +++ b/third_party/WebKit/Tools/ChangeLog @@ -1,3 +1,16 @@ +2012-10-31 Terry Anderson <tdanderson@chromium.org> + + [touchadjustment] touch-links-two-finger-tap test pass incorrectly + https://bugs.webkit.org/show_bug.cgi?id=100619 + + Reviewed by Antonio Gomes. + + Store the touch area when sending a GestureTwoFingerTap event. + + * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: + (WebTestRunner): + (WebTestRunner::EventSender::gestureEvent): + 2012-10-31 Dirk Pranke <dpranke@chromium.org> nrwt is not killing stuck DRTs on chromium win diff --git a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp index 4b9f421..77fcb76 100644 --- a/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp +++ b/third_party/WebKit/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp @@ -1208,6 +1208,10 @@ void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList& case WebInputEvent::GestureTwoFingerTap: event.x = point.x; event.y = point.y; + if (arguments.size() >= 4) { + event.data.twoFingerTap.firstFingerWidth = static_cast<float>(arguments[2].toDouble()); + event.data.twoFingerTap.firstFingerHeight = static_cast<float>(arguments[3].toDouble()); + } break; default: ASSERT_NOT_REACHED(); |