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

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

Issue 14767007: A div can be pan-scrolled beyond its overflow (Windows only) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WIP, not for review Created 7 years, 7 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style type="text/css">
5 div {
6 line-height: 50px;
7 }
8 #outerdiv {
9 overflow:auto;
10 border: 2px solid #000FFF;
11 }
12 #innerdiv {
13 overflow:auto;
14 border: 2px solid #000000;
15 width: 120%;
16 padding: 5px;
17 }
18 </style>
19 <script>
20 function $(id) { return document.getElementById(id); }
21
22 function testIt() {
23 var outerdiv = $('outerdiv');
24 var retryCount = 0;
25
26 // Attempt a digonal pan scroll originating in the inner div.
27 eventSender.mouseMoveTo(150, 150);
28 eventSender.mouseDown(1);
29 eventSender.mouseUp(1);
30 eventSender.mouseMoveTo(225, 75);
31
32 function checkScrolled()
33 {
34 ++retryCount;
35 if (outerdiv.scrollLeft || retryCount > 10) {
36 finishTest();
37 return;
38 }
39
40 window.setTimeout(checkScrolled, 50);
41 }
42
43 function finishTest() {
44 shouldNotBe('outerdiv.scrollLeft', '0');
yosin_UTC9 2013/05/17 02:00:22 This 'outerdiv' refers window.outerdiv from div[@i
tdanderson 2013/05/17 17:30:20 Done.
45 shouldBeZero('outerdiv.scrollTop');
46 testRunner.notifyDone();
47 }
48
49 checkScrolled();
50 }
51
52 function setUpTest()
53 {
54 if (!window.eventSender) {
55 console.log('Please run within DumpRenderTree.');
56 return;
57 }
58
59 window.jsTestIsAsync = true;
60 window.setTimeout(testIt, 0);
61 }
62 </script>
63 </head>
64 <body>
65 <div id="outerdiv">
66 <p>Top of outer div.</p>
67 <div id="innerdiv">
68 <p>Inner div.</p>
69 </div>
70 <p>Bottom of outer div.</p>
71 </div>
72 <p>Test for <a href="http://crbug.com/232965">bug 232965</a> This tests that ver tical pan scrolling does not propagate from the inner div to the outer div when the outer div has no vertical overflow.</p>
73 <div id="console"></div>
74 <script src="../js/resources/js-test-pre.js"></script>
75 <script>
76 setUpTest();
77 </script>
78 <script src="../js/resources/js-test-post.js"></script>
79 </body>
80 </html>
OLDNEW
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/events/panScroll-nested-divs-forbidden-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698