Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html

Issue 641063003: Pass correct client coordinates for mouse events synthesized from a GestureTap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update test output Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html
diff --git a/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html b/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html
index 90b80d3ad44684aabc31b818a9fbeb504a062937..40594b117f3cdbf80b9b2b1fc0b93d5ddc4756fa 100644
--- a/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html
+++ b/LayoutTests/fast/events/touch/gesture/gesture-tap-frame-scrolled.html
@@ -16,11 +16,12 @@ body {
<div id=console></div>
<script>
var event;
-window.scrollTo(0, 3);
+var scrollOffset = 3;
Rick Byers 2014/10/10 00:39:35 nit: call this windowScrollOffset (to avoid confus
+window.scrollTo(0, scrollOffset);
var rect = target.getBoundingClientRect();
var point = {
x: rect.left + rect.width / 2,
- y: rect.top + rect.height / 2 - 3
+ y: rect.top + rect.height / 2
};
var eventReceived = {};
@@ -31,8 +32,8 @@ function onEventInFrame(e) {
eventReceived[e.type] = true;
shouldBe("event.screenX", "point.x");
shouldBe("event.screenY", "point.y");
- shouldBe("event.clientX", "50 / 2");
- shouldBe("event.clientY", "50 / 2 + 7");
Rick Byers 2014/10/10 00:39:35 Ok so it looks like the real problem here is that
+ shouldBe("event.clientX", "point.x");
Rick Byers 2014/10/10 00:39:35 using "point" here seems wrong because point is in
Zeeshan Qureshi 2014/10/10 00:47:23 That looks more readable, will update.
+ shouldBe("event.clientY", "point.y + scrollOffset");
}
description("Verifies that a tap occuring in a scrolled iframe has the correct co-ordinates");

Powered by Google App Engine
This is Rietveld 408576698