Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css-generated-content / hit-test-generated-content.html
blob4dde038c725a128a77af8ba962bd46d3db035f93
1 <html>
2 <head>
3 <style>
4 #target {
5 position: relative;
6 width: 100px;
7 height: 100px;
10 #target::before {
11 position: absolute;
12 top: 0;
13 left: 0;
14 width: 100%;
15 height: 100%;
16 background-color: gray;
17 content: "";
20 </style>
21 <script type="text/javascript" charset="utf-8">
22 if (window.testRunner)
23 testRunner.dumpAsText();
25 function runTest()
27 var hitElement = document.elementFromPoint(58, 58);
28 var results = document.getElementById('results')
29 if (hitElement && hitElement.id == 'target')
30 results.innerHTML = 'elementFromPoint found target: PASS';
31 else
32 results.innerHTML = 'elementFromPoint did not find target: FAIL';
34 </script>
35 </head>
36 <body onload="runTest()">
38 <p>Tests hit testing on generated content</p>
39 <div id="target">&nbsp;</div>
41 <div id="results">
42 </div>
44 </body>
45 </html>