Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / multicol / caret-range-anonymous-block.html
blob0d459da24e02f8c6382d497f3e2b474f15779cb5
1 <!DOCTYPE html>
2 <style>
3 body {
4 margin:0;
7 #mc {
8 -webkit-columns: 3;
9 -webkit-column-gap: 20px;
10 width: 280px;
11 margin:20px 100px;
12 font: 20px/1 Ahem;
15 #log {
16 position: absolute;
17 top: 101px;
19 </style>
20 <div id="log">
21 <p id="description"></p>
22 <div id="console"></div>
23 </div>
24 <div id="mc">
25 <div>
26 <!-- Here's an empty block to trigger wrapping of the sibling text inside an anonymous block. -->
27 </div>xxx xxx xxx xxx xxx xxx xxx xxx xxx</div>
28 <script src="../../resources/js-test.js"></script>
29 <script>
30 description("Test that hitting an anonymous block child of a multicol container takes us to the right text content.");
32 debug("First column:");
33 shouldBe("document.caretRangeFromPoint(170,39).startOffset", "3");
34 shouldBe("document.caretRangeFromPoint(170,40).startOffset", "7");
35 shouldBe("document.caretRangeFromPoint(170,79).startOffset", "11");
37 debug("Second column:");
38 shouldBe("document.caretRangeFromPoint(270,39).startOffset", "15");
39 shouldBe("document.caretRangeFromPoint(270,40).startOffset", "19");
40 shouldBe("document.caretRangeFromPoint(270,79).startOffset", "23");
42 debug("Third column:");
43 shouldBe("document.caretRangeFromPoint(370,39).startOffset", "27");
44 shouldBe("document.caretRangeFromPoint(370,40).startOffset", "31");
45 shouldBe("document.caretRangeFromPoint(370,79).startOffset", "35");
46 </script>