OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> | 4 <link rel="stylesheet" href="../../../js/resources/js-test-style.css"> |
5 <script src="../../../js/resources/js-test-pre.js"></script> | 5 <script src="../../../js/resources/js-test-pre.js"></script> |
6 <script src="resources/gesture-helpers.js"></script> | 6 <script src="resources/gesture-helpers.js"></script> |
7 <style type="text/css"> | 7 <style type="text/css"> |
8 | 8 |
9 ::-webkit-scrollbar { | 9 ::-webkit-scrollbar { |
10 width: 0px; | 10 width: 0px; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 </div> | 46 </div> |
47 | 47 |
48 <p id="description"></p> | 48 <p id="description"></p> |
49 <div id="console"></div> | 49 <div id="console"></div> |
50 <script type="text/javascript"> | 50 <script type="text/javascript"> |
51 | 51 |
52 var movedbox; | 52 var movedbox; |
53 var touchtarget; | 53 var touchtarget; |
54 var iframe; | 54 var iframe; |
55 var iframeBody; | 55 var iframeBody; |
56 var iframeDocumentElement; | |
57 var expectedGesturesTotal = 1; | 56 var expectedGesturesTotal = 1; |
58 var gesturesOccurred = 0; | 57 var gesturesOccurred = 0; |
59 var scrollAmountX = ['0']; | 58 var scrollAmountX = ['0']; |
60 var scrollAmountY = ['0']; | 59 var scrollAmountY = ['0']; |
61 var wheelEventsOccurred = 0; | 60 var wheelEventsOccurred = 0; |
62 var expectedWheelEventsOccurred = ['0']; | 61 var expectedWheelEventsOccurred = ['0']; |
63 var scrollEventsOccurred = 0; | 62 var scrollEventsOccurred = 0; |
64 var scrolledElement = 'movedbox' | 63 var scrolledElement = 'movedbox' |
65 var scrollEventsOccurred = 0; | 64 var scrollEventsOccurred = 0; |
66 var expectedScrollEventsOccurred = '1'; | 65 var expectedScrollEventsOccurred = '1'; |
67 | 66 |
68 function firstGestureScroll() | 67 function firstGestureScroll() |
69 { | 68 { |
70 iframe = touchtarget; | 69 iframe = touchtarget; |
71 iframeBody = iframe.contentDocument.body; | 70 iframeBody = iframe.contentDocument.body; |
72 iframeDocumentElement = iframe.contentDocument.documentElement; | |
73 | 71 |
74 debug("first gesture"); | 72 debug("first gesture"); |
75 eventSender.gestureScrollBegin(10, 72); | 73 eventSender.gestureScrollBegin(10, 72); |
76 eventSender.gestureScrollUpdateWithoutPropagation(0, -700); | 74 eventSender.gestureScrollUpdateWithoutPropagation(0, -700); |
77 eventSender.gestureScrollUpdateWithoutPropagation(0, -100); | 75 eventSender.gestureScrollUpdateWithoutPropagation(0, -100); |
78 eventSender.gestureScrollUpdateWithoutPropagation(0, -70); | 76 eventSender.gestureScrollUpdateWithoutPropagation(0, -70); |
79 eventSender.gestureScrollUpdateWithoutPropagation(0, -10); | 77 eventSender.gestureScrollUpdateWithoutPropagation(0, -10); |
80 eventSender.gestureScrollEnd(0, 0); | 78 eventSender.gestureScrollEnd(0, 0); |
81 | 79 |
82 // Make sure the actual iframe got fully scrolled | 80 // Make sure the actual iframe got fully scrolled |
83 shouldBe('iframeBody.scrollHeight - iframeDocumentElement.scrollTop', 'ifram
e.clientHeight'); | 81 shouldBe('iframeBody.scrollHeight - iframeBody.scrollTop', 'iframe.clientHei
ght'); |
84 | 82 |
85 // Wait for layout. | 83 // Wait for layout. |
86 checkScrollOffset(); | 84 checkScrollOffset(); |
87 } | 85 } |
88 | 86 |
89 if (window.testRunner) | 87 if (window.testRunner) |
90 testRunner.waitUntilDone(); | 88 testRunner.waitUntilDone(); |
91 | 89 |
92 function runTest() | 90 function runTest() |
93 { | 91 { |
(...skipping 13 matching lines...) Expand all Loading... |
107 } else { | 105 } else { |
108 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 106 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
109 } | 107 } |
110 } | 108 } |
111 </script> | 109 </script> |
112 | 110 |
113 | 111 |
114 | 112 |
115 </body> | 113 </body> |
116 </html> | 114 </html> |
OLD | NEW |