chromium/third_party/blink/web_tests/plugins/touch-events-synthesized.html

<html>
<head>
<style>
  #plugin {
    width: 150px;
    height: 150px;
  }
</style>
</head>

<body>
<embed id="touch_plugin" type="application/x-webkit-test-webplugin" accepts-touch="synthetic" print-event-details="true"></embed><embed id="plugin" type="application/x-webkit-test-webplugin"></embed>
<script>

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

        var positionX = plugin.offsetLeft + 10;
        var positionY = plugin.offsetTop + 10;
        eventSender.addTouchPoint(positionX, positionY);
        eventSender.touchStart();
        eventSender.releaseTouchPoint(0);
        eventSender.touchEnd();

        positionX = touch_plugin.offsetLeft + 10;
        positionY = touch_plugin.offsetTop + 10;
        eventSender.addTouchPoint(positionX, positionY);
        eventSender.touchStart();
        eventSender.updateTouchPoint(0, positionX + 10, positionY + 5);
        eventSender.touchMove();
        eventSender.releaseTouchPoint(0);
        eventSender.touchEnd();

        testRunner.zoomPageIn();
        eventSender.addTouchPoint(positionX, positionY);
        eventSender.touchStart();
        eventSender.updateTouchPoint(0, positionX + 10, positionY + 5);
        eventSender.touchMove();
        eventSender.releaseTouchPoint(0);
        eventSender.touchEnd();

        testRunner.zoomPageOut();
        eventSender.addTouchPoint(positionX, positionY);
        eventSender.touchStart();
        eventSender.updateTouchPoint(0, positionX + 10, positionY + 5);
        eventSender.touchMove();
        eventSender.releaseTouchPoint(0);
        eventSender.touchEnd();
    }

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