blob: 43502a4fb14b14b42c4ec9e98b0499d2c167ac79 (
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
|
<!DOCTYPE HTML>
<html>
<body>
<p id="description"></p>
<div style="width:100px; height:80px; background-color:green; color:white" id="target">Scroll over me</div>
<div id="console"></div>
<script src="../js/resources/js-test-pre.js"></script>
<script>
description("This test checks for the existence of the webkitDirectionInvertedFromDevice property in the WheelEvent.");
var t = document.getElementById("target");
var c = document.getElementById('console');
var result = undefined;
function scrollHandler(event) {
result = event.webkitDirectionInvertedFromDevice;
event.preventDefault();
};
t.addEventListener('mousewheel', scrollHandler, false);
if (window.testRunner && window.eventSender) {
debug("sending scroll event to green target");
eventSender.mouseMoveTo(t.offsetLeft + 10, t.offsetTop + 10);
eventSender.continuousMouseScrollBy(0,10);
shouldBeTrue('result != undefined');
}
</script>
</body>
</html>
|