summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/scrolling/unscrollable-subpixel-overflow-mouse-drag.html
blob: c23d341876efbb09f9bd2077f6c8894e34b0ffad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<style>
body {
  zoom: 175%;
  margin: 0;
}
#container {
  overflow-y: scroll;
  width: 200px;
  height: 200px;
}
#content {
  background-color: green;
  width: 100px;
  height: 200.3px;
}
</style>
Tests scroll behavior when an unscrollable scrollbar thumb is dragged by mouse.
Passes if neither the thumb or the content changes.
<div id="container">
  <div id="content"></div>
</div>
<script src="../../resources/js-test.js"></script>
<script>
if (window.eventSender) {
  onload = function() {
    var container = document.getElementById('container');
    eventSender.mouseMoveTo(340, 200);
    eventSender.mouseDown();
    eventSender.mouseMoveTo(340, 250);
    eventSender.mouseUp();
    shouldBe("container.scrollTop", "0");
  };
}
</script>