summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/plugins/gesture-events.html
blob: 82f6a436da32b202b45d058ad0f6c7bb12f25e88 (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
<html>
<head>
<style>
  #plugin {
    width: 150px;
    height: 150px;
  }
</style>
</head>

<body>
<embed id="plugin" type="application/x-webkit-test-webplugin" primitive="triangle" background-color="green" primitive-color="blue"></embed>
<script>

    if (!window.testRunner) {
        document.write("This test does not work in manual mode.");
    } else {
        testRunner.dumpAsText();

        // Send some gesture events to the plugin.
        var positionX = plugin.offsetLeft + 10;
        var positionY = plugin.offsetTop + 10;
        eventSender.gestureTap(positionX, positionY);
        eventSender.gestureShowPress(positionX, positionY);
        eventSender.gestureScrollBegin(positionX, positionY);
        eventSender.gestureScrollUpdate(30, 0);
        eventSender.gestureScrollUpdateWithoutPropagation(30, 0);
        eventSender.gestureScrollEnd(0, 0);
    }

</script>
</body>
</html>