52 lines
1.6 KiB
HTML
52 lines
1.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
|
|
<html>
|
|
<head>
|
|
<script src="../../resources/js-test-pre.js"></script>
|
|
<script>
|
|
var successfullyParsed = false;
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<table border=1>
|
|
<tr><th>header 1</th><th>header 2</th><th tabindex=0 id="header">header 3</th></tr>
|
|
<tr><td>cell 1</td><td colspan=2><div role="button" id="cell2" tabindex=0>cell</div> 2</td></tr>
|
|
<tr><td>cell 4</td><td id="cell5" tabindex=0>cell 5</td><td>cell <div role="button" id="cell6" tabindex=0>6</div></td></tr>
|
|
|
|
<p id="description"></p>
|
|
<div id="console"></div>
|
|
|
|
<script>
|
|
|
|
description("This test makes sure that you can retrieve elements within a cell by their row and column");
|
|
|
|
if (window.accessibilityController) {
|
|
|
|
document.getElementById("cell2").focus();
|
|
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
|
|
var cell2 = accessibilityController.focusedElement;
|
|
|
|
document.getElementById("header").focus();
|
|
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
|
|
var header = accessibilityController.focusedElement;
|
|
|
|
shouldBeTrue("cell2.cellForColumnAndRow(2, 0).isEqual(header)");
|
|
|
|
document.getElementById("cell5").focus();
|
|
internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
|
|
var cell6 = accessibilityController.focusedElement;
|
|
shouldBeTrue("header.cellForColumnAndRow(1, 2).isEqual(cell6)");
|
|
|
|
}
|
|
|
|
successfullyParsed = true;
|
|
</script>
|
|
|
|
<script src="../../resources/js-test-post.js"></script>
|
|
|
|
</body>
|
|
</html>
|
|
|