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

Unified Diff: LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html

Issue 25039006: document.documentElement.scrollTop/Left is zero (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: document.documentElement.scrollTop/Left is zero Created 7 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/touch-gesture-fully-scrolled-iframe-propagates.html
diff --git a/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html b/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html
index d56a7e284a0d86f3afecb95fba4a6c846f34349a..5c477365e047b2788d7c41393f3e42912821a760 100644
--- a/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html
+++ b/LayoutTests/fast/events/touch/gesture/touch-gesture-fully-scrolled-iframe-propagates.html
@@ -53,6 +53,7 @@ var movedbox;
var touchtarget;
var iframe;
var iframeBody;
+var iframeDocumentElement;
var expectedGesturesTotal = 1;
var gesturesOccurred = 0;
var scrollAmountX = ['0'];
@@ -68,13 +69,14 @@ function firstGestureScroll()
{
iframe = touchtarget;
iframeBody = iframe.contentDocument.body;
+ iframeDocumentElement = touchtarget.contentDocument.documentElement;
var amountToScroll = iframeBody.scrollHeight - iframe.clientHeight;
- touchtarget.contentDocument.body.scrollTop = amountToScroll;
+ iframeBody.scrollTop = amountToScroll;
// Sanity - make sure the iframe is actually fully scrolled scrolled
- shouldBe('iframeBody.scrollHeight - iframeBody.scrollTop', 'iframe.clientHeight');
+ shouldBe('iframeBody.scrollHeight - iframeDocumentElement.scrollTop', 'iframe.clientHeight');
eventSender.gestureScrollBegin(10, 72);
eventSender.gestureScrollUpdateWithoutPropagation(0, -20);
@@ -99,7 +101,7 @@ function runTest()
touchtarget = document.getElementById("touchtargetiframe");
touchtarget.contentDocument.addEventListener("scroll", recordScroll);
- touchtarget.contentDocument.body.addEventListener("mousewheel", recordWheel);
+ touchtarget.contentDocument.documentElement.addEventListener("mousewheel", recordWheel);
if (window.eventSender) {
description('This tests that a fling gesture sent to an iframe with no remaining scroll offset ' +

Powered by Google App Engine
This is Rietveld 408576698