Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / tables / hittesting / filltable-stress.html
blob7b37932284bbc5f9a3293dca3a42dc8d02634535
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <head>
7 <title>Fill Table Hit Test</title>
8 <style>
9 body { margin: 0px 0px 0px 0px; }
10 </style>
11 <script language="JavaScript" type="text/javascript">
12 var cellHeight = 20;
13 var logMsg = "";
14 var lastSuccess = 0;
15 var failed = false;
17 if (window.testRunner) {
18 testRunner.dumpAsText();
19 window.testRunner.waitUntilDone();
22 function cellHit(cell) {
23 var cellId = 24 * cell.parentNode.rowIndex + cell.cellIndex;
24 lastSuccess = cellId;
27 function doTest(cellwidth) {
28 var ypos = cellHeight;
29 for (var row = 0; row < 24; row++) {
30 var xpos = cellwidth;
31 for (var col = 0; col < 19; col++) {
32 var cellId = 24 * row + col;
33 logMsg += "Attempting to hit cell at row: " + row + ", column: " + col + ": ";
34 var elem = document.elementFromPoint(xpos, ypos);
35 if (elem) elem.onmousemove();
36 var success = lastSuccess == cellId;
37 if (!success) failed = true;
38 logMsg += (success ? "SUCCESS" : "FAIL") + "<br />";
39 xpos += cellwidth + 1;
41 ypos += cellHeight;
43 document.body.innerHTML =(failed ? "FAIL!!!<br/>" : "SUCCESS!!!<br/>") +logMsg;
44 if (window.testRunner) {
45 window.testRunner.notifyDone();
49 function CreateTable(tablewidth, rowcount, colcount) {
50 var cellwidth = (tablewidth / colcount) - 1;
51 var tablestr = "<table style=\"table-layout:fixed;\" border=\"1\" width=\"" +
52 tablewidth + "\" cellspacing=\"0\" cellpadding=\"0\">";
53 for (var row = 0; row < rowcount; row++) {
54 var rowstr = "<tr height=\"20\">";
55 for (var col = 0; col < colcount; col++) {
56 var cellId = "r" + row + "c" + col;
57 var colstr = "<td width=\"" + cellwidth + "\" id=\"" + cellId + "\" onmousemove=\"cellHit(this)\"></td>";
58 rowstr += colstr;
60 rowstr += "</tr>";
62 tablestr += rowstr;
64 tablestr += "</table>";
65 document.getElementById('tablebox').innerHTML = tablestr;
66 doTest(Math.round(cellwidth));
68 </script>
69 </head>
71 <body onload="CreateTable(500, 50, 20);" >
72 <div id="tablebox" style="overflow:hidden; width:500px; height:500px;"></div>
73 </body>
75 </html>