Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / pagination / caret-range-outside-paged-x-vertical-rl.html
blob5b0003f0c7046b80560d7ce8a005c879c2ec1e39
1 <!DOCTYPE html>
2 <script src="../../resources/ahem.js"></script>
3 <style>
4 body {
5 margin:0;
8 /* Need a wrapper to establish the writing mode, thanks to crbug.com/463462 */
9 #wrapper {
10 -webkit-writing-mode: vertical-rl;
11 padding: 50px;
12 width: 400px;
13 height: 250px;
16 #pagedContainer {
17 overflow: -webkit-paged-x;
18 -webkit-column-gap: 0;
19 width: 120px;
20 height: 200px;
21 font: 40px/1 Ahem;
24 #log {
25 position: absolute;
26 top: 351px;
28 </style>
29 <div id="log">
30 <p id="description"></p>
31 <div id="console"></div>
32 </div>
33 <div id="wrapper">
34 <div id="pagedContainer">xxx xxx xxx xxx xxx xxx xxx xxx xxx</div>
35 </div>
36 <script src="../../resources/js-test.js"></script>
37 <script>
38 onload = function() {
39 description("Test that hitting areas outside a paged container takes us to the right text content on some page.");
41 // FIXME: We should ideally test above and below every page, but we get bogus results,
42 // thanks to crbug.com/466554 , so avoid testing in the problematic areas.
44 debug("Above page 1:");
45 shouldBe("document.caretRangeFromPoint(499,0).startOffset", "0");
46 shouldBe("document.caretRangeFromPoint(430,0).startOffset", "0");
47 shouldBe("document.caretRangeFromPoint(390,0).startOffset", "4");
49 debug("Below page 1:");
50 shouldBe("document.caretRangeFromPoint(499,320).startOffset", "0");
51 shouldBe("document.caretRangeFromPoint(430,320).startOffset", "3");
52 shouldBe("document.caretRangeFromPoint(390,320).startOffset", "7");
54 debug("To the right of page 1:");
55 shouldBe("document.caretRangeFromPoint(499,320).startOffset", "0");
56 shouldBe("document.caretRangeFromPoint(499,250).startOffset", "0");
57 shouldBe("document.caretRangeFromPoint(499,0).startOffset", "0");
59 debug("Scroll to page 2");
60 document.getElementById("pagedContainer").scrollLeft = 120;
62 debug("Above page 2:");
63 shouldBe("document.caretRangeFromPoint(449,0).startOffset", "12");
64 shouldBe("document.caretRangeFromPoint(330,0).startOffset", "20");
66 debug("Below page 2:");
67 shouldBe("document.caretRangeFromPoint(449,320).startOffset", "15");
68 shouldBe("document.caretRangeFromPoint(330,320).startOffset", "23");
70 debug("Scroll to page 3");
71 document.getElementById("pagedContainer").scrollLeft = 0;
73 debug("Above page 3:");
74 shouldBe("document.caretRangeFromPoint(449,0).startOffset", "24");
75 shouldBe("document.caretRangeFromPoint(330,0).startOffset", "32");
77 debug("Below page 3:");
78 shouldBe("document.caretRangeFromPoint(449,320).startOffset", "27");
79 shouldBe("document.caretRangeFromPoint(330,320).startOffset", "35");
81 </script>