| 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 <style type="text/css"> | 6 <style type="text/css"> |
| 7 | 7 |
| 8 ::-webkit-scrollbar { | 8 ::-webkit-scrollbar { |
| 9 width: 0px; | 9 width: 0px; |
| 10 height: 0px; | 10 height: 0px; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 <p id="description"></p> | 56 <p id="description"></p> |
| 57 <div id="console"></div> | 57 <div id="console"></div> |
| 58 <script type="text/javascript"> | 58 <script type="text/javascript"> |
| 59 | 59 |
| 60 var movedbox; | 60 var movedbox; |
| 61 var touchtarget; | 61 var touchtarget; |
| 62 var expectedGesturesTotal = 2; | 62 var expectedGesturesTotal = 2; |
| 63 var gesturesOccurred = 0; | 63 var gesturesOccurred = 0; |
| 64 var scrollAmountX = ['0', '0']; | 64 var scrollAmountX = ['0', '0']; |
| 65 var scrollAmountY = ['0', '50']; | 65 var scrollAmountY = ['0', '0']; |
| 66 var wheelEventsOccurred = 0; | 66 var wheelEventsOccurred = 0; |
| 67 var expectedWheelEventsOccurred = ['0', '0']; | 67 var expectedWheelEventsOccurred = ['0', '0']; |
| 68 var scrollEventsOccurred = 0; | 68 var scrollEventsOccurred = 0; |
| 69 var scrolledElement = 'movedbox' | 69 var scrolledElement = 'movedbox' |
| 70 var scrollEventsOccurred = 0; | 70 var scrollEventsOccurred = 0; |
| 71 var expectedScrollEventsOccurred = '1'; | 71 var expectedScrollEventsOccurred = '1'; |
| 72 | 72 |
| 73 function firstGestureScroll() | 73 function firstGestureScroll() |
| 74 { | 74 { |
| 75 debug("first gesture"); | 75 debug("first gesture"); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 97 testRunner.waitUntilDone(); | 97 testRunner.waitUntilDone(); |
| 98 | 98 |
| 99 function runTest() | 99 function runTest() |
| 100 { | 100 { |
| 101 movedbox = document.getElementById("outerdiv"); | 101 movedbox = document.getElementById("outerdiv"); |
| 102 touchtarget = document.getElementById("touchtargetiframe"); | 102 touchtarget = document.getElementById("touchtargetiframe"); |
| 103 touchtarget.contentDocument.addEventListener("scroll", recordScroll); | 103 touchtarget.contentDocument.addEventListener("scroll", recordScroll); |
| 104 touchtarget.contentDocument.body.addEventListener("mousewheel", recordWheel)
; | 104 touchtarget.contentDocument.body.addEventListener("mousewheel", recordWheel)
; |
| 105 | 105 |
| 106 if (window.eventSender) { | 106 if (window.eventSender) { |
| 107 description('This tests that a gesture scroll is propagated from an ' + | 107 description('This tests that a gesture scroll isn\'t propagated from an
' + |
| 108 'iframe to an outer div when the iframe has no remaining ' + | 108 'iframe to an outer div when the iframe has no remaining ' + |
| 109 'scroll offset.'); | 109 'scroll offset.'); |
| 110 if (checkTestDependencies()) | 110 if (checkTestDependencies()) |
| 111 firstGestureScroll(); | 111 firstGestureScroll(); |
| 112 else | 112 else |
| 113 exitIfNecessary(); | 113 exitIfNecessary(); |
| 114 } else { | 114 } else { |
| 115 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); | 115 debug("This test requires DumpRenderTree. Gesture-scroll the page to va
lidate the implementation."); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 </script> | 118 </script> |
| 119 | 119 |
| 120 | 120 |
| 121 | 121 |
| 122 </body> | 122 </body> |
| 123 </html> | 123 </html> |
| OLD | NEW |