43 lines
864 B
HTML
43 lines
864 B
HTML
<html>
|
|
<head>
|
|
<style>
|
|
#forceSensor {
|
|
width: 200px;
|
|
height: 200px;
|
|
border: 2px solid black;
|
|
}
|
|
</style>
|
|
<script>
|
|
|
|
function forceDown()
|
|
{
|
|
var console = document.getElementById("console");
|
|
console.innerHTML = "Success! The mouseforcedown event was dispatched.";
|
|
testRunner.notifyDone();
|
|
}
|
|
|
|
function startTest()
|
|
{
|
|
var forceSensor = document.getElementById("forceSensor");
|
|
forceSensor.addEventListener("webkitmouseforcedown", forceDown, false);
|
|
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
testRunner.waitUntilDone();
|
|
}
|
|
|
|
if (window.eventSender) {
|
|
eventSender.mouseMoveTo(100, 100);
|
|
eventSender.mouseForceDown();
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="startTest()">
|
|
|
|
<div id="forceSensor"></div>
|
|
<pre id="console">Failed. This test must be run in the test harness.</pre>
|
|
|
|
</body>
|
|
</html> |