| Index: third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1e0b4116de503e5d1db19e023afe4197984b1e9e
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
|
| @@ -0,0 +1,37 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +<textarea id="textarea" style="width: 150px; height: 100px;"></textarea>
|
| +<div id="resizablediv" style="resize:both; overflow:scroll; width: 100px; height: 100px;"></div>
|
| +<script>
|
| + function doScroll(x, y, deltaY, device) {
|
| + eventSender.gestureScrollBegin(device, x, y);
|
| + eventSender.gestureScrollUpdate(device, 0, deltaY);
|
| + eventSender.gestureScrollEnd(device, 0, 0);
|
| + }
|
| +
|
| + function resize(id, scrollDeltaY, expectedDeltaY, device) {
|
| + var target = document.getElementById(id);
|
| + var rect = target.getBoundingClientRect();
|
| + var old_height = target.offsetHeight;
|
| + // Scrolling within the normal resizer area (15 x 15)
|
| + doScroll(rect.right - 5, rect.bottom - 5, scrollDeltaY, device);
|
| + assert_equals(target.offsetHeight - old_height, expectedDeltaY);
|
| + }
|
| +
|
| + test(function() {
|
| + resize("textarea", 20, 20, "touchscreen");
|
| + }, 'Touchscreen drag resizes textarea');
|
| +
|
| + test(function() {
|
| + resize("textarea", 20, 0, "touchpad");
|
| + }, 'Touchpad scroll should not resize textarea');
|
| +
|
| + test(function() {
|
| + resize("resizablediv", 20, 20, "touchscreen");
|
| + }, 'Touchscreen drag resizes resizable div');
|
| +
|
| + test(function() {
|
| + resize("resizablediv", 20, 0, "touchpad");
|
| + }, 'Touchpad scroll should not resize resizable div');
|
| +</script>
|
|
|