blob: 5c473959b2889328054b15a44bfa0e34888282bb (
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
36
37
38
39
40
41
42
43
44
45
|
<html>
<head>
<style>
body {
height: 2000px;
}
#plugin {
position: absolute;
top: 500px;
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();
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
// Scroll so the plugin is 100px down the page
window.scroll(0, 400);
// These events should not reach the plugin since it's futher down on the page.
eventSender.gestureShowPress(30, 30);
eventSender.gestureShowPress(30, 530);
// Send some gesture events to the plugin.
var positionX = 30;
var positionY = 110;
eventSender.gestureTap(positionX, positionY);
eventSender.gestureScrollBegin(positionX, positionY);
eventSender.gestureScrollUpdate(30, 0);
eventSender.gestureScrollUpdate(30, 0, true);
eventSender.gestureScrollEnd(0, 0);
}
</script>
</body>
</html>
|