Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Side by Side Diff: LayoutTests/fast/events/panScroll-nested-divs.html

Issue 15653007: Introduce panScrollTest() for simplify pan-scroll test scripts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-06-03T12:33 Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Pan Scrolling Test</title> 3 <style type="text/css">
4 </head> 4 #scrollable {
5 <body> 5 width:500px;
6 <script> 6 height:300px;
7 if (testRunner) { 7 overflow:auto;
8 testRunner.dumpAsText(); 8 border:2px solid red;
9 testRunner.waitUntilDone(); 9 padding:10px";
10 } 10 }
11 </script> 11 </style>
12 <div id="overflow" style="width:500px; height:300px; overflow:auto; bord er:2px solid red; padding:10px"> 12 <script src="../js/resources/js-test-pre.js"></script>
13 <div style="height:200px; position:relative;"> 13 <script src="./resources/panScroll.js"></script>
14 <div style="height:150px; border:1px blue solid; overflow:auto;" > 14 <script>
15 Panscrolling starting in the blue box should scroll the oute r div. 15 function start()
16 </div> 16 {
17 Panscrolling outside the blue boxes should scroll the outer div. 17 description('Check pan scroll in nested divs');
18 </div> 18 testPanScroll({
19 <div style="height:200px; position:relative;"> 19 'clickOrDrag': 'click',
20 <div style="height:150px; border:1px blue solid; overflow:auto;" > 20 'scrollable': $('scrollable'),
21 Panscrolling starting in the blue box should scroll the oute r div. 21 });
22 </div> 22 }
23 </div> 23 </script>
24 </head>
25 <body onload="start()">
26 <div id="container">
27 <p id="description"></p>
28 Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> T his tests that pan scrolling
29 propogates correctly up the DOM tree. On success, our scroll offset should be no n-zero.
30 <div id="scrollable">
31 <div style="height:200px; position:relative;">
32 <div style="height:150px; border:1px blue solid; overflow:auto;">
33 Panscrolling starting in the blue box should scroll the outer div.
24 </div> 34 </div>
25 <p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=28023">bug 28023</a> This tests that pan scrolling 35 Panscrolling outside the blue boxes should scroll the outer div.
26 propogates correctly up the DOM tree. On success, our scroll offset shou ld be non-zero.</p> 36 </div>
27 <div id="console"></div> 37 <div style="height:200px; position:relative;">
28 <script> 38 <div style="height:150px; border:1px blue solid; overflow:auto;">
29 if (eventSender) 39 Panscrolling starting in the blue box should scroll the outer div.
30 { 40 </div>
31 eventSender.mouseMoveTo(50, 50); 41 </div>
32 eventSender.mouseDown(1); 42 </div>
33 eventSender.mouseUp(1); 43 </div>
34 eventSender.mouseMoveTo(50, 200); 44 <div id="console"></div>
35 setTimeout(finished, 500); 45 <script src="../js/resources/js-test-post.js"></script>
36 } 46 </body>
37
38 function finished()
39 {
40 if (document.getElementById('overflow').scrollTop)
41 document.getElementById('console').innerHTML = "Success! Div with overflow was scrolled";
42 else
43 document.getElementById('console').innerHTML = "Fail! Div wi th overflow was not scrolled";
44
45 window.testRunner.notifyDone();
46 }
47 </script>
48 </body>
49 </html> 47 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/panScroll-in-iframe-expected.txt ('k') | LayoutTests/fast/events/panScroll-nested-divs-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698