OLD | NEW |
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="height: 500px; overflow-x: scroll; overflow-y:
scroll"> | 10 <div id="container" style="height: 500px; overflow-x: scroll; overflow-y:
scroll"> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 resetScroll(); | 110 resetScroll(); |
111 shouldBe('box.scrollTop', '0'); | 111 shouldBe('box.scrollTop', '0'); |
112 shouldBe('container.scrollTop', '0'); | 112 shouldBe('container.scrollTop', '0'); |
113 | 113 |
114 eventSender.gestureScrollBegin(gestureX, gestureY); | 114 eventSender.gestureScrollBegin(gestureX, gestureY); |
115 eventSender.gestureScrollUpdate(0, -fullyScrolled); | 115 eventSender.gestureScrollUpdate(0, -fullyScrolled); |
116 eventSender.gestureScrollUpdate(0, -50); | 116 eventSender.gestureScrollUpdate(0, -50); |
117 eventSender.gestureScrollEnd(0, 0); | 117 eventSender.gestureScrollEnd(0, 0); |
118 | 118 |
119 debug("Gesture scrolling list past the end should scroll container d
iv"); | 119 debug("Gesture scrolling list past the end shouldn't scroll containe
r div"); |
120 shouldBe('box.scrollTop', 'fullyScrolled'); | 120 shouldBe('box.scrollTop', 'fullyScrolled'); |
121 shouldBe('container.scrollTop', '50'); | 121 shouldBe('container.scrollTop', '0'); |
| 122 |
| 123 eventSender.gestureScrollBegin(gestureX, gestureY); |
| 124 eventSender.gestureScrollUpdate(0, -fullyScrolled); |
| 125 eventSender.gestureScrollUpdate(0, -50); |
| 126 eventSender.gestureScrollEnd(0, 0); |
| 127 |
| 128 debug("Gesture scrolling list past the end should scroll container d
iv when starting at scroll extent"); |
| 129 shouldBe('box.scrollTop', 'fullyScrolled'); |
| 130 shouldBe('container.scrollTop', 'fullyScrolled + 50'); |
| 131 |
122 } | 132 } |
123 | 133 |
124 function testHorizontalScroll() | 134 function testHorizontalScroll() |
125 { | 135 { |
126 debug("===Testing horizontal scroll==="); | 136 debug("===Testing horizontal scroll==="); |
127 | 137 |
128 resetScroll(); | 138 resetScroll(); |
129 shouldBe('box.scrollLeft', '0'); | 139 shouldBe('box.scrollLeft', '0'); |
130 shouldBe('container.scrollLeft', '0'); | 140 shouldBe('container.scrollLeft', '0'); |
131 | 141 |
(...skipping 28 matching lines...) Expand all Loading... |
160 testRunner.notifyDone(); | 170 testRunner.notifyDone(); |
161 } else | 171 } else |
162 exitIfNecessary(); | 172 exitIfNecessary(); |
163 } else { | 173 } else { |
164 debug("This test requires DumpRenderTree. Gesture-scroll the pa
ge to validate the implementation."); | 174 debug("This test requires DumpRenderTree. Gesture-scroll the pa
ge to validate the implementation."); |
165 } | 175 } |
166 } | 176 } |
167 </script> | 177 </script> |
168 </body> | 178 </body> |
169 </html> | 179 </html> |
OLD | NEW |