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

Unified Diff: LayoutTests/fast/scrolling/fractional-scroll-offset-document.html

Issue 629583002: Make compositor and blink talk in fractional scroll offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/scrolling/fractional-scroll-offset-document.html
diff --git a/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html b/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html
new file mode 100644
index 0000000000000000000000000000000000000000..33fcd80a1c2ce9a303b2d88cae4e94542d14178e
--- /dev/null
+++ b/LayoutTests/fast/scrolling/fractional-scroll-offset-document.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+<html>
Rick Byers 2014/10/04 00:04:24 nit: omit <html> tag
Yufeng Shen (Slow to review) 2014/10/06 17:54:58 Done.
+<body style="width:30000px;height:30000px" onload="runTest()">
+</body>
+
+<script src="../../resources/js-test.js"></script>
+<script>
+description("Verifies that document scrolling supports fractional offset.");
+
+var floatPrecision = 0.00001;
+function checkScrollOffset(offset_x, offset_y)
+{
+ if (window.eventSender) {
Rick Byers 2014/10/04 00:04:24 nit: remove this check. We'll never hit this func
Yufeng Shen (Slow to review) 2014/10/06 17:54:57 Done.
+ shouldBeCloseTo('document.documentElement.scrollTop', offset_y, floatPrecision);
+ shouldBeCloseTo('document.documentElement.scrollLeft', offset_x, floatPrecision);
+ }
+}
+
+function scroll()
+{
+ eventSender.gestureScrollBegin(100.1, 300.2);
+ checkScrollOffset(0, 0);
+ eventSender.gestureScrollUpdate(-20.5, -10.2);
+ checkScrollOffset(20.5, 10.2);
+ eventSender.gestureScrollUpdate(10.9, -20.9);
+ checkScrollOffset(9.6, 31.1);
+ eventSender.gestureScrollUpdate(100.4, 220.9);
+ checkScrollOffset(0.0, 0.0);
+ eventSender.gestureScrollEnd(0, 0);
+
+ isSuccessfullyParsed();
+ if (window.testRunner)
+ testRunner.notifyDone();
Rick Byers 2014/10/04 00:04:24 You should be able to remove these three lines. T
Yufeng Shen (Slow to review) 2014/10/06 17:54:57 Done.
Rick Byers 2014/10/06 21:11:30 remove isSuccessfullyParsed too - that should be r
+}
+
+function runTest()
+{
+ if (window.eventSender)
+ scroll();
+}
+
+</script>
+</html>

Powered by Google App Engine
This is Rietveld 408576698