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; |
56 var expectedGesturesTotal = 1; | 57 var expectedGesturesTotal = 1; |
57 var gesturesOccurred = 0; | 58 var gesturesOccurred = 0; |
58 var scrollAmountX = ['0']; | 59 var scrollAmountX = ['0']; |
59 var scrollAmountY = ['0']; | 60 var scrollAmountY = ['0']; |
60 var wheelEventsOccurred = 0; | 61 var wheelEventsOccurred = 0; |
61 var expectedWheelEventsOccurred = ['0']; | 62 var expectedWheelEventsOccurred = ['0']; |
62 var scrollEventsOccurred = 0; | 63 var scrollEventsOccurred = 0; |
63 var scrolledElement = 'movedbox' | 64 var scrolledElement = 'movedbox' |
64 var scrollEventsOccurred = 0; | 65 var scrollEventsOccurred = 0; |
65 var expectedScrollEventsOccurred = '1'; | 66 var expectedScrollEventsOccurred = '1'; |
66 | 67 |
67 function firstGestureScroll() | 68 function firstGestureScroll() |
68 { | 69 { |
69 iframe = touchtarget; | 70 iframe = touchtarget; |
70 iframeBody = iframe.contentDocument.body; | 71 iframeBody = iframe.contentDocument.body; |
| 72 iframeDocumentElement = iframe.contentDocument.documentElement; |
71 | 73 |
72 debug("first gesture"); | 74 debug("first gesture"); |
73 eventSender.gestureScrollBegin(10, 72); | 75 eventSender.gestureScrollBegin(10, 72); |
74 eventSender.gestureScrollUpdateWithoutPropagation(0, -700); | 76 eventSender.gestureScrollUpdateWithoutPropagation(0, -700); |
75 eventSender.gestureScrollUpdateWithoutPropagation(0, -100); | 77 eventSender.gestureScrollUpdateWithoutPropagation(0, -100); |
76 eventSender.gestureScrollUpdateWithoutPropagation(0, -70); | 78 eventSender.gestureScrollUpdateWithoutPropagation(0, -70); |
77 eventSender.gestureScrollUpdateWithoutPropagation(0, -10); | 79 eventSender.gestureScrollUpdateWithoutPropagation(0, -10); |
78 eventSender.gestureScrollEnd(0, 0); | 80 eventSender.gestureScrollEnd(0, 0); |
79 | 81 |
80 // Make sure the actual iframe got fully scrolled | 82 // Make sure the actual iframe got fully scrolled |
81 shouldBe('iframeBody.scrollHeight - iframeBody.scrollTop', 'iframe.clientHei
ght'); | 83 shouldBe('iframeBody.scrollHeight - iframeDocumentElement.scrollTop', 'ifram
e.clientHeight'); |
82 | 84 |
83 // Wait for layout. | 85 // Wait for layout. |
84 checkScrollOffset(); | 86 checkScrollOffset(); |
85 } | 87 } |
86 | 88 |
87 if (window.testRunner) | 89 if (window.testRunner) |
88 testRunner.waitUntilDone(); | 90 testRunner.waitUntilDone(); |
89 | 91 |
90 function runTest() | 92 function runTest() |
91 { | 93 { |
(...skipping 13 matching lines...) Expand all Loading... |
105 } else { | 107 } else { |
106 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 108 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
107 } | 109 } |
108 } | 110 } |
109 </script> | 111 </script> |
110 | 112 |
111 | 113 |
112 | 114 |
113 </body> | 115 </body> |
114 </html> | 116 </html> |
OLD | NEW |