chromium/third_party/blink/web_tests/fast/events/middleClickAutoscroll-use-count.html

<style type="text/css">
#scrollable {
    height: 1000px;
    overflow: auto;
    border: solid 3px #cc0000;
    font-size: 80px;
}
</style>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div id="container">
<p id="description"></p>
For manual testing, hold middle button in scrollable and move around mouse pointer for scrolling, then release middle button to stop scrolling.
<div id="scrollable"></div>
</div>
<div id="console"></div>
</body>
<script>
test(function() {
    if (!window.eventSender)
        return;
    var middleButton = 1;
    var middleClickAutoscrollRadius = 15;
    var middleClickAutoscrollStart = 1551;
    var scrollable = document.getElementById("scrollable");
    var startX = scrollable.offsetLeft + 5;
    var startY = scrollable.offsetTop + 5;
    var endX = startX;
    var endY = scrollable.offsetTop + middleClickAutoscrollRadius + 6;
    eventSender.mouseMoveTo(startX, startY);
    eventSender.mouseDown(middleButton);
    eventSender.mouseMoveTo(endX, endY);
    assert_true(internals.isUseCounted(document, middleClickAutoscrollStart));
    eventSender.mouseUp(middleButton);
})
</script>