Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / hit-test-float.html
1 <style>
2     #target { width: 50px; height: 50px; background-color: green; margin: 10px; }
3 </style>
4 <p>
5     Test for hit-testing of floats inside CSS Regions.
6 </p>
7 <div style="position:relative; margin: 100px; width: 300px; height: 200px; outline: solid black;">
8     <div style="position:absolute;left:0;top:0; -webkit-flow-from: flow; width:150px;height:200px;"></div>
9     <div style="position:absolute;left:150px;top:0; -webkit-flow-from: flow; width:150px;height:200px"></div>
10     <div style="-webkit-flow-into: flow">
11         <div style="height: 250px; background-color: purple;"></div>
12         <div style="float: right; background-color: lightyellow; margin: 5px;">
13             <div id="target"></div>
14         </div>
15     </div>
16 </div>
17 <div id="result">FAIL: Test did not run.</div>
18 <script>
19     if (window.testRunner)
20         testRunner.dumpAsText();
21
22     var result = document.getElementById("result");
23     var hitElement = document.elementFromPoint(370, 230);
24     if (hitElement === document.getElementById("target"))
25         result.innerText = "PASS";
26     else
27         result.innerText = "FAIL: Hit " + hitElement;
28 </script>