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

Unified Diff: LayoutTests/fast/events/autoscroll-overflow-hidden-longhands.html

Issue 23567020: overflow-y: hidden areas can still be scrolled vertically (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: overflow-y: hidden areas can still be scrolled vertically Created 7 years, 3 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 | « no previous file | LayoutTests/fast/events/autoscroll-overflow-hidden-longhands-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/autoscroll-overflow-hidden-longhands.html
diff --git a/LayoutTests/fast/events/autoscroll-overflow-hidden-longhands.html b/LayoutTests/fast/events/autoscroll-overflow-hidden-longhands.html
new file mode 100644
index 0000000000000000000000000000000000000000..b2a900e3298fd30bb526f81b5073788f7c278f8b
--- /dev/null
+++ b/LayoutTests/fast/events/autoscroll-overflow-hidden-longhands.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+ <head>
+ <script>
+ function log(msg)
+ {
+ document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
+ }
+
+ function test()
+ {
+ if (window.testRunner) {
+ testRunner.waitUntilDone();
+ testRunner.dumpAsText();
+ }
+
+ var textInDiv = document.getElementById('textInDiv');
+ if (window.eventSender) {
+ var x = textInDiv.offsetLeft + 17;
+ var y = textInDiv.offsetTop + 7;
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(x, y + 20);
+ eventSender.mouseMoveTo(x, y + 220);
+ }
+ setTimeout(autoscrollTestPart2, 100);
+ }
+
+ function autoscrollTestPart2()
+ {
+ if (window.eventSender)
+ eventSender.mouseUp();
+ var sd = document.getElementById('nonScrollableDiv');
+ if (sd.scrollTop == 0)
+ log("PASSED : the autoscroll did not happen!");
+ else
+ log("FAILED : the autoscroll has happened :-(");
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ </script>
+ </head>
+<body onload="test()">
+ <div id="description">Test ensure overflow:hidden has the same effect that overflow-y:hidden has with respect to autoscroll.<br>
+ To test manually, text select by draggin the text below, and move the mouse downwards out of the div boundary. It should not scroll!
+ </div>
+ <div id="nonScrollableDiv" style="height: 100px; overflow-x: auto; overflow-y: hidden; width: 100px">
+ <div id="tailDiv" style=" height: 1000px; background-color: yellow">
+ <span id='textInDiv'> Try to autoscroll this text.<br>
+ </div>
+ </div>
+ <div id="console"></div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/events/autoscroll-overflow-hidden-longhands-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698