summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
blob: 4feaf035513e799db33b71bec0782ae3b2eda93f (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
<!DOCTYPE HTML>
<html>
<head>
  <title>Test for pointer events with preserve-3d</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<div>
  <div>
    <div style="perspective: 100px; transform-style:preserve-3d; transform: translateX(100px)">
      <div style="display:inline">
        <div id="color" style="transform-style:flat; transform: translateX(-100px); display: block; background-color: blue; width: 200px; height: 200px;"></div>
      </div>
    </div>
  </div>
</div>
<script class="testbody" type="text/javascript">
function runTest() {
    var target = document.elementFromPoint(200, 200);
    ok(target == document.getElementById("color"), "Find the right target.");
    var target = document.elementFromPoint(16, 16);
    ok(target == document.getElementById("color"), "Find the right target.");
}

runTest();
</script>
</body>
</html>