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"); |
Rick Byers
2015/09/03 19:55:10
For cases like this, do we / should we have tests
| |
120 shouldBe('box.scrollTop', 'fullyScrolled'); | 120 shouldBe('box.scrollTop', 'fullyScrolled'); |
121 shouldBe('container.scrollTop', '50'); | 121 shouldBe('container.scrollTop', '0'); |
122 } | 122 } |
123 | 123 |
124 function testHorizontalScroll() | 124 function testHorizontalScroll() |
125 { | 125 { |
126 debug("===Testing horizontal scroll==="); | 126 debug("===Testing horizontal scroll==="); |
127 | 127 |
128 resetScroll(); | 128 resetScroll(); |
129 shouldBe('box.scrollLeft', '0'); | 129 shouldBe('box.scrollLeft', '0'); |
130 shouldBe('container.scrollLeft', '0'); | 130 shouldBe('container.scrollLeft', '0'); |
131 | 131 |
(...skipping 28 matching lines...) Expand all Loading... | |
160 testRunner.notifyDone(); | 160 testRunner.notifyDone(); |
161 } else | 161 } else |
162 exitIfNecessary(); | 162 exitIfNecessary(); |
163 } else { | 163 } else { |
164 debug("This test requires DumpRenderTree. Gesture-scroll the pa ge to validate the implementation."); | 164 debug("This test requires DumpRenderTree. Gesture-scroll the pa ge to validate the implementation."); |
165 } | 165 } |
166 } | 166 } |
167 </script> | 167 </script> |
168 </body> | 168 </body> |
169 </html> | 169 </html> |
OLD | NEW |