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

Unified 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: Working layout test 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/NeverFixTests ('k') | LayoutTests/fast/events/panScroll-nested-divs-forbidden-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/panScroll-nested-divs-forbidden.html
diff --git a/LayoutTests/fast/events/panScroll-nested-divs-forbidden.html b/LayoutTests/fast/events/panScroll-nested-divs-forbidden.html
new file mode 100644
index 0000000000000000000000000000000000000000..aba65687c828fed13268c0dcd7bb85a0bc6360f0
--- /dev/null
+++ b/LayoutTests/fast/events/panScroll-nested-divs-forbidden.html
@@ -0,0 +1,81 @@
+<!DOCTYPE html>
+<html>
+<head>
+<style type="text/css">
+div {
+ line-height: 50px;
+}
+#outerdiv {
+ overflow:auto;
+ border: 2px solid #000FFF;
+}
+#innerdiv {
+ overflow:auto;
+ border: 2px solid #000000;
+ width: 121%;
+ padding: 5px;
+}
+</style>
+<script>
+function $(id) { return document.getElementById(id); }
+var outerdiv;
+
+function testIt() {
+ outerdiv = $('outerdiv');
+ var retryCount = 0;
+
+ // Attempt a digonal pan scroll originating in the inner div.
+ eventSender.mouseMoveTo(150, 150);
+ eventSender.mouseDown(1);
+ eventSender.mouseUp(1);
+ eventSender.mouseMoveTo(225, 75);
+
+ function checkScrolled()
+ {
+ ++retryCount;
+ if (outerdiv.scrollLeft || retryCount > 10) {
+ finishTest();
+ return;
+ }
+
+ window.setTimeout(checkScrolled, 50);
jamesr 2013/05/29 22:46:56 this looks flaky to me. why 50ms? what happens if
yosin_UTC9 2013/05/30 01:45:54 50ms is auto scrolling interval. We may catch seco
yosin_UTC9 2013/05/30 04:29:56 Finally, I understand what you expect. We can use
+ }
+
+ function finishTest() {
+ shouldNotBe('outerdiv.scrollLeft', '0');
+ shouldBeZero('outerdiv.scrollTop');
+ testRunner.notifyDone();
+ }
+
+ checkScrolled();
+}
+
+function setUpTest()
+{
+ if (!window.eventSender) {
+ console.log('Please run within DumpRenderTree.');
+ return;
+ }
+
+ window.jsTestIsAsync = true;
+ window.onload = testIt;
+}
+</script>
+</head>
+<body>
+<div id="outerdiv">
+ <p>Top of outer div.</p>
+ <div id="innerdiv">
+ <p>Inner div.</p>
+ </div>
+ <p>Bottom of outer div.</p>
+</div>
+<p>Test for <a href="http://crbug.com/232965">bug 232965</a> This tests that vertical pan scrolling does not propagate from the inner div to the outer div when the outer div has no vertical overflow.</p>
+<div id="console"></div>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+setUpTest();
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>
« 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