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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE HTML>
2 <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.
3 <body style="width:30000px;height:30000px" onload="runTest()">
4 </body>
5
6 <script src="../../resources/js-test.js"></script>
7 <script>
8 description("Verifies that document scrolling supports fractional offset.");
9
10 var floatPrecision = 0.00001;
11 function checkScrollOffset(offset_x, offset_y)
12 {
13 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.
14 shouldBeCloseTo('document.documentElement.scrollTop', offset_y, floatPre cision);
15 shouldBeCloseTo('document.documentElement.scrollLeft', offset_x, floatPr ecision);
16 }
17 }
18
19 function scroll()
20 {
21 eventSender.gestureScrollBegin(100.1, 300.2);
22 checkScrollOffset(0, 0);
23 eventSender.gestureScrollUpdate(-20.5, -10.2);
24 checkScrollOffset(20.5, 10.2);
25 eventSender.gestureScrollUpdate(10.9, -20.9);
26 checkScrollOffset(9.6, 31.1);
27 eventSender.gestureScrollUpdate(100.4, 220.9);
28 checkScrollOffset(0.0, 0.0);
29 eventSender.gestureScrollEnd(0, 0);
30
31 isSuccessfullyParsed();
32 if (window.testRunner)
33 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
34 }
35
36 function runTest()
37 {
38 if (window.eventSender)
39 scroll();
40 }
41
42 </script>
43 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698