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

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: Minimal patch to fix the bug 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
(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 var outerdiv;
22
23 function testIt() {
24 outerdiv = $('outerdiv');
25 var retryCount = 0;
26
27 // Attempt a digonal pan scroll originating in the inner div.
28 eventSender.mouseMoveTo(150, 150);
29 eventSender.mouseDown(1);
30 eventSender.mouseUp(1);
31 eventSender.mouseMoveTo(225, 75);
32
33 function checkScrolled()
34 {
35 ++retryCount;
36 if (outerdiv.scrollLeft || retryCount > 10) {
37 finishTest();
38 return;
39 }
40
41 window.setTimeout(checkScrolled, 50);
jamesr 2013/05/28 22:26:11 what is this delay for?
yosin_UTC9 2013/05/29 08:15:52 I think 50ms comes from Autscroll timer interval.
42 }
43
44 function finishTest() {
45 shouldNotBe('outerdiv.scrollLeft', '0');
46 shouldBeZero('outerdiv.scrollTop');
47 testRunner.notifyDone();
48 }
49
50 checkScrolled();
51 }
52
53 function setUpTest()
54 {
55 if (!window.eventSender) {
56 console.log('Please run within DumpRenderTree.');
57 return;
58 }
59
60 window.jsTestIsAsync = true;
61 window.setTimeout(testIt, 0);
jamesr 2013/05/28 22:26:11 what is this timeout for?
yosin_UTC9 2013/05/29 08:15:52 It is better to use 'load' event rather than timeo
tdanderson 2013/05/29 17:57:32 Done.
62 }
63 </script>
64 </head>
65 <body>
66 <div id="outerdiv">
67 <p>Top of outer div.</p>
68 <div id="innerdiv">
69 <p>Inner div.</p>
70 </div>
71 <p>Bottom of outer div.</p>
72 </div>
73 <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>
74 <div id="console"></div>
75 <script src="../js/resources/js-test-pre.js"></script>
76 <script>
77 setUpTest();
78 </script>
79 <script src="../js/resources/js-test-post.js"></script>
80 </body>
81 </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