2010-08-19 Fady Samuel <fsamuel@chromium.org>

        Reviewed by Dimitri Glazkov.

        Fixed table hit testing layout test issues
        https://bugs.webkit.org/show_bug.cgi?id=44204

        Moved expectations to the same directory as tests.
        Expectations were failing due to inconsistent eventSender behavior:
        Switched to using elementFromPoint

        * platform/gtk/tables/hittesting/filltable-emptycells-expected.txt: Removed.
        * platform/gtk/tables/hittesting/filltable-levels-expected.txt: Removed.
        * platform/gtk/tables/hittesting/filltable-outline-expected.txt: Removed.
        * platform/gtk/tables/hittesting/filltable-rtl-expected.txt: Removed.
        * platform/gtk/tables/hittesting/filltable-stress-expected.txt: Removed.
        * tables/hittesting/filltable-emptycells-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-emptycells-expected.txt.
        * tables/hittesting/filltable-emptycells.html:
        * tables/hittesting/filltable-levels-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-levels-expected.txt.
        * tables/hittesting/filltable-levels.html:
        * tables/hittesting/filltable-outline-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-outline-expected.txt.
        * tables/hittesting/filltable-outline.html:
        * tables/hittesting/filltable-rtl-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-rtl-expected.txt.
        * tables/hittesting/filltable-rtl.html:
        * tables/hittesting/filltable-stress-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-stress-expected.txt.
        * tables/hittesting/filltable-stress.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@65714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 88b90920
2010-08-19 Fady Samuel <fsamuel@chromium.org>
Reviewed by Dimitri Glazkov.
Fixed table hit testing layout test issues
https://bugs.webkit.org/show_bug.cgi?id=44204
Moved expectations to the same directory as tests.
Expectations were failing due to inconsistent eventSender behavior:
Switched to using elementFromPoint
* platform/gtk/tables/hittesting/filltable-emptycells-expected.txt: Removed.
* platform/gtk/tables/hittesting/filltable-levels-expected.txt: Removed.
* platform/gtk/tables/hittesting/filltable-outline-expected.txt: Removed.
* platform/gtk/tables/hittesting/filltable-rtl-expected.txt: Removed.
* platform/gtk/tables/hittesting/filltable-stress-expected.txt: Removed.
* tables/hittesting/filltable-emptycells-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-emptycells-expected.txt.
* tables/hittesting/filltable-emptycells.html:
* tables/hittesting/filltable-levels-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-levels-expected.txt.
* tables/hittesting/filltable-levels.html:
* tables/hittesting/filltable-outline-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-outline-expected.txt.
* tables/hittesting/filltable-outline.html:
* tables/hittesting/filltable-rtl-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-rtl-expected.txt.
* tables/hittesting/filltable-rtl.html:
* tables/hittesting/filltable-stress-expected.txt: Renamed from LayoutTests/platform/chromium-linux/tables/hittesting/filltable-stress-expected.txt.
* tables/hittesting/filltable-stress.html:
2010-08-19 Adam Barth <abarth@webkit.org>
Reviewed by Alexey Proskuryakov.
SUCCESS!!!
Hit cell at row: 0, column: 0: SUCCESS
Hit cell at row: 0, column: 1: EMPTY
Hit cell at row: 0, column: 2: EMPTY
Hit cell at row: 1, column: 0: SUCCESS
Hit cell at row: 1, column: 1: SUCCESS
Hit cell at row: 1, column: 2: SUCCESS
SUCCESS!!!
Hit cell at row: 0, column: 0: SUCCESS
Hit cell at row: 0, column: 1: SUCCESS
Hit cell at row: 0, column: 2: SUCCESS
Hit cell at row: 1, column: 0: SUCCESS
Hit cell at row: 1, column: 1: SUCCESS
Hit cell at row: 1, column: 2: SUCCESS
Hit cell at row: 2, column: 0: SUCCESS
Hit cell at row: 2, column: 1: SUCCESS
Hit cell at row: 2, column: 2: SUCCESS
SUCCESS!!!
Hit cell at row: 0, column: 0: SUCCESS
Hit cell at row: 0, column: 1: SUCCESS
Hit cell at row: 0, column: 2: SUCCESS
Hit cell at row: 0, column: 3: SUCCESS
Hit cell at row: 0, column: 4: SUCCESS
Hit cell at row: 0, column: 5: SUCCESS
Hit cell at row: 0, column: 6: SUCCESS
Hit cell at row: 0, column: 7: SUCCESS
Hit cell at row: 0, column: 8: SUCCESS
Hit cell at row: 0, column: 9: SUCCESS
Hit cell at row: 1, column: 0: SUCCESS
Hit cell at row: 1, column: 1: SUCCESS
Hit cell at row: 1, column: 2: SUCCESS
Hit cell at row: 1, column: 3: SUCCESS
Hit cell at row: 1, column: 4: SUCCESS
Hit cell at row: 1, column: 5: SUCCESS
Hit cell at row: 1, column: 6: SUCCESS
Hit cell at row: 1, column: 7: SUCCESS
Hit cell at row: 1, column: 8: SUCCESS
Hit cell at row: 1, column: 9: SUCCESS
Hit cell at row: 2, column: 0: SUCCESS
Hit cell at row: 2, column: 1: SUCCESS
Hit cell at row: 2, column: 2: SUCCESS
Hit cell at row: 2, column: 3: SUCCESS
Hit cell at row: 2, column: 4: SUCCESS
Hit cell at row: 2, column: 5: SUCCESS
Hit cell at row: 2, column: 6: SUCCESS
Hit cell at row: 2, column: 7: SUCCESS
Hit cell at row: 2, column: 8: SUCCESS
Hit cell at row: 2, column: 9: SUCCESS
Hit cell at row: 3, column: 0: SUCCESS
Hit cell at row: 3, column: 1: SUCCESS
Hit cell at row: 3, column: 2: SUCCESS
Hit cell at row: 3, column: 3: SUCCESS
Hit cell at row: 3, column: 4: SUCCESS
Hit cell at row: 3, column: 5: SUCCESS
Hit cell at row: 3, column: 6: SUCCESS
Hit cell at row: 3, column: 7: SUCCESS
Hit cell at row: 3, column: 8: SUCCESS
Hit cell at row: 3, column: 9: SUCCESS
Hit cell at row: 4, column: 0: SUCCESS
Hit cell at row: 4, column: 1: SUCCESS
Hit cell at row: 4, column: 2: SUCCESS
Hit cell at row: 4, column: 3: SUCCESS
Hit cell at row: 4, column: 4: SUCCESS
Hit cell at row: 4, column: 5: SUCCESS
Hit cell at row: 4, column: 6: SUCCESS
Hit cell at row: 4, column: 7: SUCCESS
Hit cell at row: 4, column: 8: SUCCESS
Hit cell at row: 4, column: 9: SUCCESS
Hit cell at row: 5, column: 0: SUCCESS
Hit cell at row: 5, column: 1: SUCCESS
Hit cell at row: 5, column: 2: SUCCESS
Hit cell at row: 5, column: 3: SUCCESS
Hit cell at row: 5, column: 4: SUCCESS
Hit cell at row: 5, column: 5: SUCCESS
Hit cell at row: 5, column: 6: SUCCESS
Hit cell at row: 5, column: 7: SUCCESS
Hit cell at row: 5, column: 8: SUCCESS
Hit cell at row: 5, column: 9: SUCCESS
Hit cell at row: 6, column: 0: SUCCESS
Hit cell at row: 6, column: 1: SUCCESS
Hit cell at row: 6, column: 2: SUCCESS
Hit cell at row: 6, column: 3: SUCCESS
Hit cell at row: 6, column: 4: SUCCESS
Hit cell at row: 6, column: 5: SUCCESS
Hit cell at row: 6, column: 6: SUCCESS
Hit cell at row: 6, column: 7: SUCCESS
Hit cell at row: 6, column: 8: SUCCESS
Hit cell at row: 6, column: 9: SUCCESS
Hit cell at row: 7, column: 0: SUCCESS
Hit cell at row: 7, column: 1: SUCCESS
Hit cell at row: 7, column: 2: SUCCESS
Hit cell at row: 7, column: 3: SUCCESS
Hit cell at row: 7, column: 4: SUCCESS
Hit cell at row: 7, column: 5: SUCCESS
Hit cell at row: 7, column: 6: SUCCESS
Hit cell at row: 7, column: 7: SUCCESS
Hit cell at row: 7, column: 8: SUCCESS
Hit cell at row: 7, column: 9: SUCCESS
Hit cell at row: 8, column: 0: SUCCESS
Hit cell at row: 8, column: 1: SUCCESS
Hit cell at row: 8, column: 2: SUCCESS
Hit cell at row: 8, column: 3: SUCCESS
Hit cell at row: 8, column: 4: SUCCESS
Hit cell at row: 8, column: 5: SUCCESS
Hit cell at row: 8, column: 6: SUCCESS
Hit cell at row: 8, column: 7: SUCCESS
Hit cell at row: 8, column: 8: SUCCESS
Hit cell at row: 8, column: 9: SUCCESS
Hit cell at row: 9, column: 0: SUCCESS
Hit cell at row: 9, column: 1: SUCCESS
Hit cell at row: 9, column: 2: SUCCESS
Hit cell at row: 9, column: 3: SUCCESS
Hit cell at row: 9, column: 4: SUCCESS
Hit cell at row: 9, column: 5: SUCCESS
Hit cell at row: 9, column: 6: SUCCESS
Hit cell at row: 9, column: 7: SUCCESS
Hit cell at row: 9, column: 8: SUCCESS
Hit cell at row: 9, column: 9: SUCCESS
SUCCESS!!!
Hit cell at row: 0, column: 0: SUCCESS
Hit cell at row: 0, column: 1: SUCCESS
Hit cell at row: 0, column: 2: SUCCESS
Hit cell at row: 1, column: 0: SUCCESS
Hit cell at row: 1, column: 1: SUCCESS
Hit cell at row: 1, column: 2: SUCCESS
Hit cell at row: 2, column: 0: SUCCESS
Hit cell at row: 2, column: 1: SUCCESS
Hit cell at row: 2, column: 2: SUCCESS
......@@ -22,21 +22,20 @@
return row == 0 && col > 0;
}
function cellMouseMove(cell) {
function cellHit(cell) {
var cellId = 3 * cell.parentNode.rowIndex + cell.cellIndex;
cell.style.backgroundColor = "green";
// If we see an even number of moves then the cell's bit is 1 else 0
lastSuccess = cellId;
}
function doTest() {
if (!window.layoutTestController) return;
var ypos = cellHeight / 2;
for (var row = 0; row < 2; row++) {
var xpos = cellWidth / 2;
for (var col = 0; col < 3; col++) {
var oldLastSuccess = lastSuccess;
eventSender.mouseMoveTo(xpos, ypos);
var elem = document.elementFromPoint(xpos, ypos);
if (elem && elem.onmousemove) elem.onmousemove();
var cellId = 3 * row + col;
logMsg += "Hit cell at row: " + row + ", column: " + col + ": ";
var success = lastSuccess == cellId;
......@@ -58,15 +57,15 @@
<table class="testtable">
<tr>
<td align="right" id="r1c1" onmousemove="cellMouseMove(this)">
<td align="right" onmousemove="cellHit(this)">
</td>
</tr>
<tr>
<td id="r2c1" onmousemove="cellMouseMove(this)">
<td onmousemove="cellHit(this)">
</td>
<td id="r2c2" onmousemove="cellMouseMove(this)">
<td onmousemove="cellHit(this)">
</td>
<td id="r2c3" onmousemove="cellMouseMove(this)">
<td onmousemove="cellHit(this)">
</td>
</tr>
</table>
......
......@@ -30,44 +30,39 @@
}
}
function cellMouseMove_r1c1(cell) {
function cellHit_r1c1(cell) {
hitArray[0][0] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r1c2(cell) {
function cellHit_r1c2(cell) {
hitArray[0][1] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r1c3(cell) {
function cellHit_r1c3(cell) {
hitArray[0][2] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c1(cell) {
function cellHit_r2c1(cell) {
hitArray[1][0] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c2(cell) {
function cellHit_r2c2(cell) {
hitArray[1][1] = true;
// The second grid slot that this cell occupies is obscured by another cell.
//hitArray[2][1] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c3(cell) {
function cellHit_r2c3(cell) {
hitArray[1][2] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r3c1(cell) {
function cellHit_r3c1(cell) {
hitArray[2][0] = true;
hitArray[2][1] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r3c3(cell) {
function cellHit_r3c3(cell) {
hitArray[2][2] = true;
cell.style.backgroundColor = "green";
}
function doTest() {
......@@ -76,7 +71,8 @@
var xpos = cellWidth / 2;
for (var col = 0; col < 3; col++) {
logMsg += "Hit cell at row: " + row + ", column: " + col + ": ";
eventSender.mouseMoveTo(xpos, ypos);
var elem = document.elementFromPoint(xpos, ypos);
if (elem) elem.onmousemove();
if (!hitArray[row][col]) failed = true;
logMsg += (hitArray[row][col] ? "SUCCESS" : "FAIL") + "<br />";
clearHitArray();
......@@ -94,18 +90,18 @@
<body onload="doTest()">
<table class="testtable">
<tr>
<td id="r1c1" onmousemove="cellMouseMove_r1c1(this)"></td>
<td id="r1c2" onmousemove="cellMouseMove_r1c2(this)"></td>
<td id="r1c3" onmousemove="cellMouseMove_r1c3(this)"></td>
<td onmousemove="cellHit_r1c1(this)"></td>
<td onmousemove="cellHit_r1c2(this)"></td>
<td onmousemove="cellHit_r1c3(this)"></td>
</tr>
<tr>
<td id="r2c1" onmousemove="cellMouseMove_r2c1(this)"></td>
<td id="r2c2" onmousemove="cellMouseMove_r2c2(this)" rowspan="2"></td>
<td id="r2c3" onmousemove="cellMouseMove_r2c3(this)"></td>
<td onmousemove="cellHit_r2c1(this)"></td>
<td onmousemove="cellHit_r2c2(this)" rowspan="2"></td>
<td onmousemove="cellHit_r2c3(this)"></td>
</tr>
<tr>
<td id="r3c1" onmousemove="cellMouseMove_r3c1(this)" colspan="2"></td>
<td id="r3c3" onmousemove="cellMouseMove_r3c3(this)"></td>
<td onmousemove="cellHit_r3c1(this)" colspan="2"></td>
<td onmousemove="cellHit_r3c3(this)"></td>
</tr>
</table>
</body>
......
......@@ -64,9 +64,8 @@
}
}
function cellMouseMove(cell) {
function cellHit(cell) {
hitArray[cell.parentNode.rowIndex][cell.cellIndex] = true;
cell.style.backgroundColor = "green";
}
function setup() {
......@@ -78,124 +77,124 @@
<body onload="setup()" >
<table class="testtable" cellpadding="0" cellspacing="0">
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)" id="outline1" style="outline: 50px solid red;"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)" id="outline1" style="outline: 50px solid red;"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)" id="cellabove" style="background-color: red;"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)" id="cellabove" style="background-color: red;"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)" id="cellleft"></td>
<td onmousemove="cellMouseMove(this)" id="outline2" style="outline: 50px solid red;"></td>
<td onmousemove="cellMouseMove(this)" id="cellright"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)" id="cellleft"></td>
<td onmousemove="cellHit(this)" id="outline2" style="outline: 50px solid red;"></td>
<td onmousemove="cellHit(this)" id="cellright"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)" id="cellbelow"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)" id="cellbelow"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
<tr>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellMouseMove(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
<td onmousemove="cellHit(this)"></td>
</tr>
</table>
</body>
......
......@@ -28,37 +28,31 @@
}
}
function cellMouseMove_r1c1(cell) {
function cellHit_r1c1(cell) {
hitArray[0][0] = true;
hitArray[0][1] = true;
hitArray[0][2] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c1(cell) {
function cellHit_r2c1(cell) {
hitArray[1][0] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c2(cell) {
function cellHit_r2c2(cell) {
hitArray[1][1] = true;
hitArray[2][1] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r2c3(cell) {
function cellHit_r2c3(cell) {
hitArray[1][2] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r3c1(cell) {
function cellHit_r3c1(cell) {
hitArray[2][0] = true;
cell.style.backgroundColor = "green";
}
function cellMouseMove_r3c3(cell) {
function cellHit_r3c3(cell) {
hitArray[2][2] = true;
cell.style.backgroundColor = "green";
}
function doTest() {
......@@ -67,7 +61,8 @@
var xpos = cellWidth / 2;
for (var col = 0; col < 3; col++) {
logMsg += "Hit cell at row: " + row + ", column: " + col + ": ";
eventSender.mouseMoveTo(xpos, ypos);
var elem = document.elementFromPoint(xpos, ypos);
if (elem) elem.onmousemove();
if (!hitArray[row][col]) failed = true;
logMsg += (hitArray[row][col] ? "SUCCESS" : "FAIL") + "<br />";
clearHitArray();
......@@ -86,16 +81,16 @@
<body onload="doTest()">
<table class="testtable">
<tr>