Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / writing-mode / table-hit-test.html
blob0728f6b981dac091833b901ed736da8408d748af
1 <style>
2 body { margin: 0; }
3 caption div { width: 50px; height: 50px; }
4 td { width: 50px; height: 25px; }
5 #console { margin: 8px; }
6 </style>
7 <table cellpadding="0" cellspacing="0" id="table">
8 <tbody>
9 <tr>
10 <td id="1-1-1"></td>
11 <td id="1-1-2"></td>
12 <td id="1-1-3"></td>
13 </tr>
14 <tr>
15 <td id="1-2-1"></td>
16 <td id="1-2-2"></td>
17 <td id="1-2-3"></td>
18 </tr>
19 </tbody>
20 <tbody>
21 <tr>
22 <td id="2-1-1"></td>
23 <td id="2-1-2"></td>
24 <td id="2-1-3"></td>
25 </tr>
26 </tbody>
27 <caption id="c">
28 <div></div>
29 </caption>
30 </table>
31 <pre id="console"></pre>
32 <script>
33 if (window.testRunner)
34 testRunner.dumpAsText();
36 function log(message)
38 document.getElementById("console").appendChild(document.createTextNode(message + "\n"));
41 function checkElementAtPoint(x, y, id)
43 var actualID = document.elementFromPoint(x, y).id;
44 if (actualID === id)
45 log("PASS: " + id + " at (" + x + ", " + y + ")");
46 else
47 log("FAIL: " + actualID + " instead of " + id + " at (" + x + ", " + y + ")");
50 var style = document.getElementById("table").style;
52 checkElementAtPoint(1, 1, "c");
53 checkElementAtPoint(1, 51, "1-1-1");
54 checkElementAtPoint(51, 51, "1-1-2");
55 checkElementAtPoint(101, 51, "1-1-3");
56 checkElementAtPoint(1, 76, "1-2-1");
57 checkElementAtPoint(51, 76, "1-2-2");
58 checkElementAtPoint(101, 76, "1-2-3");
59 checkElementAtPoint(1, 101, "2-1-1");
60 checkElementAtPoint(51, 101, "2-1-2");
61 checkElementAtPoint(101, 101, "2-1-3");
63 log("\nTesting horizontal-bt:");
64 style.webkitWritingMode = "horizontal-bt";
65 checkElementAtPoint(1, 101, "c");
66 checkElementAtPoint(1, 51, "1-1-1");
67 checkElementAtPoint(51, 51, "1-1-2");
68 checkElementAtPoint(101, 51, "1-1-3");
69 checkElementAtPoint(1, 26, "1-2-1");
70 checkElementAtPoint(51, 26, "1-2-2");
71 checkElementAtPoint(101, 26, "1-2-3");
72 checkElementAtPoint(1, 1, "2-1-1");
73 checkElementAtPoint(51, 1, "2-1-2");
74 checkElementAtPoint(101, 1, "2-1-3");
76 log("\nTesting vertical-lr:");
77 style.webkitWritingMode = "vertical-lr";
78 checkElementAtPoint(1, 1, "c");
79 checkElementAtPoint(51, 1, "1-1-1");
80 checkElementAtPoint(51, 26, "1-1-2");
81 checkElementAtPoint(51, 51, "1-1-3");
82 checkElementAtPoint(101, 1, "1-2-1");
83 checkElementAtPoint(101, 26, "1-2-2");
84 checkElementAtPoint(101, 51, "1-2-3");
85 checkElementAtPoint(151, 1, "2-1-1");
86 checkElementAtPoint(151, 26, "2-1-2");
87 checkElementAtPoint(151, 51, "2-1-3");
89 log("\nTesting vertical-rl:");
90 style.webkitWritingMode = "vertical-rl";
91 checkElementAtPoint(151, 1, "c");
92 checkElementAtPoint(101, 1, "1-1-1");
93 checkElementAtPoint(101, 26, "1-1-2");
94 checkElementAtPoint(101, 51, "1-1-3");
95 checkElementAtPoint(51, 1, "1-2-1");
96 checkElementAtPoint(51, 26, "1-2-2");
97 checkElementAtPoint(51, 51, "1-2-3");
98 checkElementAtPoint(1, 1, "2-1-1");
99 checkElementAtPoint(1, 26, "2-1-2");
100 checkElementAtPoint(1, 51, "2-1-3");
101 </script>