Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / fast / layers / zindex-hit-test.html
blobd5bb9f7004a9cfe03cea3868ecb1ebecf3122090
1 <!DOCTYPE html>
2 <head>
3 <style type="text/css">
4 #main {
5 position: absolute;
6 top: 10px;
7 left: 10px;
8 width: 200px;
9 height: 100px;
10 z-index: -100;
11 background-color: #eee;
13 #main:hover {
14 background-color: orange;
17 #results {
18 margin-top: 150px;
20 </style>
21 <script type="text/javascript" charset="utf-8">
22 if (window.layoutTestController)
23 layoutTestController.dumpAsText();
25 function runTest()
27 var hitElement = document.elementFromPoint(50, 50);
28 var results = document.getElementById('results');
29 var main = document.getElementById('main');
30 if (hitElement == main)
31 results.innerHTML = 'Hit testing found div "main": PASS';
32 else
33 results.innerHTML = 'Hit testing did not find div "main": FAIL';
35 </script>
36 </head>
37 <body onload="runTest()">
38 <div id="main">
39 Div with z-index: -100
40 </div>
41 <div id="results">
42 </div>
43 </body>
44 </html>