summaryrefslogtreecommitdiffstats
path: root/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
diff options
context:
space:
mode:
Diffstat (limited to 'dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html')
-rw-r--r--dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html29
1 files changed, 29 insertions, 0 deletions
diff --git a/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html b/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
new file mode 100644
index 0000000000..4feaf03551
--- /dev/null
+++ b/dom/tests/mochitest/general/test_pointerPreserves3DPerspective.html
@@ -0,0 +1,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>