Title: [133082] trunk
- Revision
- 133082
- Author
- [email protected]
- Date
- 2012-10-31 15:10:57 -0700 (Wed, 31 Oct 2012)
Log Message
[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:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (133081 => 133082)
--- trunk/LayoutTests/ChangeLog 2012-10-31 22:08:37 UTC (rev 133081)
+++ trunk/LayoutTests/ChangeLog 2012-10-31 22:10:57 UTC (rev 133082)
@@ -1,3 +1,14 @@
+2012-10-31 Terry Anderson <[email protected]>
+
+ [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 <[email protected]>
[Chromium] Unreviewed gardening. More flaky fallout from
Modified: trunk/LayoutTests/touchadjustment/touch-links-two-finger-tap.html (133081 => 133082)
--- trunk/LayoutTests/touchadjustment/touch-links-two-finger-tap.html 2012-10-31 22:08:37 UTC (rev 133081)
+++ trunk/LayoutTests/touchadjustment/touch-links-two-finger-tap.html 2012-10-31 22:10:57 UTC (rev 133082)
@@ -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.');
Modified: trunk/Tools/ChangeLog (133081 => 133082)
--- trunk/Tools/ChangeLog 2012-10-31 22:08:37 UTC (rev 133081)
+++ trunk/Tools/ChangeLog 2012-10-31 22:10:57 UTC (rev 133082)
@@ -1,3 +1,16 @@
+2012-10-31 Terry Anderson <[email protected]>
+
+ [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 <[email protected]>
nrwt is not killing stuck DRTs on chromium win
Modified: trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp (133081 => 133082)
--- trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp 2012-10-31 22:08:37 UTC (rev 133081)
+++ trunk/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp 2012-10-31 22:10:57 UTC (rev 133082)
@@ -1208,6 +1208,10 @@
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();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes