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

Unified Diff: LayoutTests/fast/events/autoscroll-upwards-propagation.html

Issue 23472005: div with overflow:hidden scrolls when dragging in a text box (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: div with overflow:hidden scrolls when dragging in a text box 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-upwards-propagation-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/events/autoscroll-upwards-propagation.html
diff --git a/LayoutTests/fast/events/autoscroll-upwards-propagation.html b/LayoutTests/fast/events/autoscroll-upwards-propagation.html
new file mode 100644
index 0000000000000000000000000000000000000000..fd6448b1923b89e265e69e801852a776242d0724
--- /dev/null
+++ b/LayoutTests/fast/events/autoscroll-upwards-propagation.html
@@ -0,0 +1,71 @@
+<head>
Julien - ping for review 2013/09/06 00:40:02 Where is Da Doctype: <DOCTYPE html>
+<style type="text/css">
Julien - ping for review 2013/09/06 00:40:02 No need for the type attribute.
+.overflow-hidden {
+ width: 100px;
+ height: 100px;
+ background: #000;
+ overflow: hidden;
+}
+input {
+ font-size: 10px;
+ height: 20px;
+}
+button {
+ position: relative;
+ left: 100px;
+ top: 100px;
+}
+</style>
+<script>
+function runTest() {
+ if (!window.testRunner)
+ return;
+ if (!window.eventSender)
+ return;
+
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ setTimeout(startTest, 0);
Julien - ping for review 2013/09/06 00:40:02 This setTimeout is very likely unneeded.
+}
+
+function startTest()
+{
+ var input = document.getElementById("input");
+ var x = input.offsetLeft + input.offsetWidth / 2;
+ var y = input.offsetTop + input.offsetHeight / 2;
+
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+
+ // We do the dragging/selection in two steps here, because if we move
+ // the mouse beyond the input boundary right way, it won't start the autoscroll
+ // timer. See early return in AutoscrollController::startAutoscrollForSelection
+ // after calling RenderBox::findAutoscrollable.
+ eventSender.mouseMoveTo(x + 48, y);
+ eventSender.mouseMoveTo(x + 55, y);
+ setTimeout(finishTest, 100);
+}
+
+function finishTest()
+{
+ eventSender.mouseUp();
+ var div = document.getElementById("div");
+ if (div.scrollTop == 0 && div.scrollLeft == 0)
+ document.getElementById("result").innerText = "Test succeeded!";
+ else
+ document.getElementById("result").innerText = "Test failed!";
+
+ testRunner.notifyDone();
+}
+
+</script>
+
+<body onload="runTest()">
+</head>
+<div id="div" class="overflow-hidden">
+<input id="input" type="text" value="any text here!"/>
+<button/>
+</div>
Julien - ping for review 2013/09/06 00:40:02 Let's add a description about what we are testing.
+<p id="result">If the test has completed this sentence should be replaced by a success message.</p>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/events/autoscroll-upwards-propagation-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698