Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / writing-mode / positionForPoint.html
blob817878fa09d7d9fa7c964c4245b856b32b8585fc
1 <div id="test-1" style="width: 200px; outline: dashed lightblue;">
2 <div style="height: 10px; background-color: silver;"></div>
3 <div style="width: 200px; height: 10px; background-color: silver; -webkit-writing-mode: vertical-lr;"></div>
4 <div class="target" style="margin-top: 40px; height: 20px; background-color: silver;"></div>
5 </div>
6 <br>
7 <div id="test-2" style="height: 200px; outline: dashed lightblue; -webkit-writing-mode: vertical-lr;">
8 <div style="width: 10px; background-color: silver;"></div>
9 <div class="target" style="margin-left: 40px; width: 10px; background-color: silver;"></div>
10 <div style="width: 20px; background-color: silver;"></div>
11 </div>
13 <pre id="console"></pre>
15 <script>
16 if (window.testRunner)
17 testRunner.dumpAsText();
19 function log(message)
21 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
24 function test(index, x, y)
26 var container = document.getElementById("test-" + index);
27 var range = document.caretRangeFromPoint(container.offsetLeft + x, container.offsetTop + y);
28 log("Test " + index + " result: "
29 + (range.startContainer.className === "target" ? "PASS" : "FAIL"));
32 test(1, 20, 50);
33 test(2, 20, 180);
34 </script>