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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/touch/gesture/touch-gesture-scroll-input-field.html

Issue 1320543006: Remove touch scroll chaining from main thread scrolling. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gclient
Patch Set: Fix silly mistake in mac expectations. Created 5 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../../resources/js-test.js"></script> 4 <script src="../../../../resources/js-test.js"></script>
5 <script src="resources/gesture-helpers.js"></script> 5 <script src="resources/gesture-helpers.js"></script>
6 6
7 </head> 7 </head>
8 8
9 <body style="margin:0" onload="runTest()"> 9 <body style="margin:0" onload="runTest()">
10 <div id="container" style="width: 500px; height: 200px; overflow-y: scroll ; overflow-x: scroll"> 10 <div id="container" style="width: 500px; height: 200px; overflow-y: scroll ; overflow-x: scroll">
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 function testFlingGestureScroll() 48 function testFlingGestureScroll()
49 { 49 {
50 debug("===Testing fling behavior==="); 50 debug("===Testing fling behavior===");
51 resetScroll(); 51 resetScroll();
52 52
53 shouldBe('box.scrollLeft', '0'); 53 shouldBe('box.scrollLeft', '0');
54 shouldBe('container.scrollLeft', '0'); 54 shouldBe('container.scrollLeft', '0');
55 55
56 eventSender.gestureScrollBegin(gestureX, gestureY); 56 eventSender.gestureScrollBegin(gestureX, gestureY);
57 // Prevent scroll to propagate by passing true for third parameter 57
58 eventSender.gestureScrollUpdate(-10, 0, true); 58 eventSender.gestureScrollUpdate(-10, 0);
59 eventSender.gestureScrollUpdate(-10, 0, true); 59 eventSender.gestureScrollUpdate(-10, 0);
60 eventSender.gestureScrollUpdate(-10, 0, true); 60 eventSender.gestureScrollUpdate(-10, 0);
61 eventSender.gestureScrollUpdate(-10, 0, true); 61 eventSender.gestureScrollUpdate(-10, 0);
62 eventSender.gestureScrollEnd(0, 0); 62 eventSender.gestureScrollEnd(0, 0);
63 63
64 debug("Flinging input text should scroll text by the specified amoun t"); 64 debug("Flinging input text should scroll text by the specified amoun t");
65 shouldBe('box.scrollLeft', '40'); 65 shouldBe('box.scrollLeft', '40');
66 shouldBe('container.scrollLeft', '0'); 66 shouldBe('container.scrollLeft', '0');
67 67
68 resetScroll(); 68 resetScroll();
69 69
70 eventSender.gestureScrollBegin(gestureX, gestureY); 70 eventSender.gestureScrollBegin(gestureX, gestureY);
71 eventSender.gestureScrollUpdate(-fullyScrolled, 0, true); 71 eventSender.gestureScrollUpdate(-fullyScrolled, 0);
72 eventSender.gestureScrollUpdate(-100, 0, true); 72 eventSender.gestureScrollUpdate(-100, 0);
73 eventSender.gestureScrollUpdate(-100, 0, true); 73 eventSender.gestureScrollUpdate(-100, 0);
74 eventSender.gestureScrollUpdate(-300, 0, true); 74 eventSender.gestureScrollUpdate(-300, 0);
75 eventSender.gestureScrollEnd(0, 0); 75 eventSender.gestureScrollEnd(0, 0);
76 76
77 debug("Flinging input text past the scrollable width shouldn't scrol l containing div"); 77 debug("Flinging input text past the scrollable width shouldn't scrol l containing div");
78 78
79 shouldBe('box.scrollLeft', 'fullyScrolled'); 79 shouldBe('box.scrollLeft', 'fullyScrolled');
80 shouldBe('container.scrollLeft', '0'); 80 shouldBe('container.scrollLeft', '0');
81 81
82 eventSender.gestureScrollBegin(gestureX, gestureY); 82 eventSender.gestureScrollBegin(gestureX, gestureY);
83 eventSender.gestureScrollUpdate(-30, 0, true); 83 eventSender.gestureScrollUpdate(-30, 0);
84 eventSender.gestureScrollUpdate(-30, 0, true); 84 eventSender.gestureScrollUpdate(-30, 0);
85 eventSender.gestureScrollEnd(0, 0); 85 eventSender.gestureScrollEnd(0, 0);
86 86
87 debug("Flinging fully scrolled input text should fling containing di v"); 87 debug("Flinging fully scrolled input text should fling containing di v");
88 shouldBe('box.scrollLeft', 'fullyScrolled'); 88 shouldBe('box.scrollLeft', 'fullyScrolled');
89 shouldBe('container.scrollLeft', '60'); 89 shouldBe('container.scrollLeft', '60');
90 } 90 }
91 91
92 function testGestureScroll() 92 function testGestureScroll()
93 { 93 {
94 debug("===Testing scroll behavior==="); 94 debug("===Testing scroll behavior===");
(...skipping 11 matching lines...) Expand all
106 shouldBe('box.scrollLeft', '60'); 106 shouldBe('box.scrollLeft', '60');
107 shouldBe('container.scrollLeft', '0'); 107 shouldBe('container.scrollLeft', '0');
108 108
109 resetScroll(); 109 resetScroll();
110 110
111 eventSender.gestureScrollBegin(gestureX, gestureY); 111 eventSender.gestureScrollBegin(gestureX, gestureY);
112 eventSender.gestureScrollUpdate(-fullyScrolled, 0); 112 eventSender.gestureScrollUpdate(-fullyScrolled, 0);
113 eventSender.gestureScrollUpdate(-50, 0); 113 eventSender.gestureScrollUpdate(-50, 0);
114 eventSender.gestureScrollEnd(0, 0); 114 eventSender.gestureScrollEnd(0, 0);
115 115
116 debug("Gesture scrolling input text past scroll width should scroll container div"); 116 debug("Gesture scrolling input text past scroll width shouldn't scro ll container div");
117 shouldBe('box.scrollLeft', 'fullyScrolled'); 117 shouldBe('box.scrollLeft', 'fullyScrolled');
118 shouldBe('container.scrollLeft', '50'); 118 shouldBe('container.scrollLeft', '0');
119 } 119 }
120 120
121 function testVerticalScroll() 121 function testVerticalScroll()
122 { 122 {
123 debug("===Testing vertical scroll behavior==="); 123 debug("===Testing vertical scroll behavior===");
124 resetScroll(); 124 resetScroll();
125 125
126 shouldBe('box.scrollTop', '0'); 126 shouldBe('box.scrollTop', '0');
127 shouldBe('container.scrollTop', '0'); 127 shouldBe('container.scrollTop', '0');
128 128
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 testRunner.notifyDone(); 189 testRunner.notifyDone();
190 } else 190 } else
191 exitIfNecessary(); 191 exitIfNecessary();
192 } else { 192 } else {
193 debug("This test requires DumpRenderTree. Gesture-scroll the pa ge to validate the implementation."); 193 debug("This test requires DumpRenderTree. Gesture-scroll the pa ge to validate the implementation.");
194 } 194 }
195 } 195 }
196 </script> 196 </script>
197 </body> 197 </body>
198 </html> 198 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698