Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / gesture / touch-gesture-scroll-div-propagated-diagonally.html
blobce8b3fd678d420a90d6c6c883aa15e99353c5be7
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../../../resources/js-test.js"></script>
5 <script src="resources/gesture-helpers.js"></script>
6 <style type="text/css">
8 ::-webkit-scrollbar {
9 width: 0px;
10 height: 0px;
13 #contents {
14 width:500px;
15 height:150px;
16 border-right:700px solid black;
17 background:red;
20 #horizontal {
21 width:600px;
22 height:600px;
23 overflow:scroll;
24 background:green;
27 #vertical {
28 height:300px;
29 overflow:scroll;
32 </style>
33 </head>
34 <body style="margin:0" onload="runTest();">
36 <div id="vertical">
37 <div id="horizontal">
38 <div id="contents"></div>
39 </div>
40 </div>
42 <p id="description"></p>
43 <div id="console"></div>
44 <script type="text/javascript">
46 if (window.testRunner)
47 testRunner.waitUntilDone();
49 function runTest()
51 if (window.eventSender) {
52 description('This tests that a gesture scroll is propagated from an ' +
53 'inner div to an outer div when the inner div has ' +
54 'remaining scroll offset on one axis, but not on the other.');
55 if (checkTestDependencies()) {
56 eventSender.gestureScrollBegin(10, 10);
57 eventSender.gestureScrollUpdate(-15, -20);
58 eventSender.gestureScrollEnd(0, 0);
59 shouldBe("horizontal.scrollLeft", "15");
60 shouldBe("vertical.scrollTop", "20");
61 if (window.testRunner)
62 testRunner.notifyDone();
63 } else {
64 exitIfNecessary();
66 } else {
67 debug("This test requires DumpRenderTree. Gesture-scroll the page diagonally to validate the implementation.");
70 </script>
72 </body>
73 </html>