summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/events/touch/touch-active-state.html
blob: 8b1fe292de4c8d5030aaff0bf2c98cef6920c029 (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
46
47
48
<html>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
<script src="../../js/resources/js-test-post-function.js"></script>
<style type="text/css">
#box {
    background-color:blue;
    width:100px;
    height:100px;
}

#box:active {
    visibility:hidden;
}

</style>
<body onload="runTest();">
<div id="box" ontouchstart="testComplete();">FAIL</div>

<p id="description"></p>
<div id="console"></div>

<script type="text/javascript">
description('Test touches set the active state.');

function testComplete(event)
{
    isSuccessfullyParsed();
    layoutTestController.notifyDone();
}

function runTest()
{
    if (window.eventSender) {
        // Touch the center of the div.
        eventSender.addTouchPoint(50, 50);
        eventSender.touchStart();
    } else
        debug('This test requires DRT.');
}

if (window.layoutTestController)
    layoutTestController.waitUntilDone();

var successfullyParsed = true;
</script>
</body>
</html>