mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
9e72c582fb
--HG-- rename : accessible/tests/mochitest/test_table_headers_ariagrid.html => accessible/tests/mochitest/table/test_headers_ariagrid.html rename : accessible/tests/mochitest/test_table_headers_listbox.xul => accessible/tests/mochitest/table/test_headers_listbox.xul rename : accessible/tests/mochitest/test_table_headers.html => accessible/tests/mochitest/table/test_headers_table.html rename : accessible/tests/mochitest/test_table_headers_tree.xul => accessible/tests/mochitest/table/test_headers_tree.xul rename : accessible/tests/mochitest/test_table_indexes_ariagrid.html => accessible/tests/mochitest/table/test_indexes_ariagrid.html rename : accessible/tests/mochitest/test_table_indexes_listbox.xul => accessible/tests/mochitest/table/test_indexes_listbox.xul rename : accessible/tests/mochitest/test_table_indexes.html => accessible/tests/mochitest/table/test_indexes_table.html rename : accessible/tests/mochitest/test_table_indexes_tree.xul => accessible/tests/mochitest/table/test_indexes_tree.xul rename : accessible/tests/mochitest/test_table_layoutguess.html => accessible/tests/mochitest/table/test_layoutguess.html rename : accessible/tests/mochitest/test_table_sels_ariagrid.html => accessible/tests/mochitest/table/test_sels_ariagrid.html rename : accessible/tests/mochitest/test_table_sels_listbox.xul => accessible/tests/mochitest/table/test_sels_listbox.xul rename : accessible/tests/mochitest/test_table_sels.html => accessible/tests/mochitest/table/test_sels_table.html rename : accessible/tests/mochitest/test_table_sels_tree.xul => accessible/tests/mochitest/table/test_sels_tree.xul rename : accessible/tests/mochitest/test_table_struct_ariagrid.html => accessible/tests/mochitest/table/test_struct_ariagrid.html rename : accessible/tests/mochitest/test_table_struct_ariatreegrid.html => accessible/tests/mochitest/table/test_struct_ariatreegrid.html rename : accessible/tests/mochitest/test_table_struct_listbox.xul => accessible/tests/mochitest/table/test_struct_listbox.xul rename : accessible/tests/mochitest/test_table_struct.html => accessible/tests/mochitest/table/test_struct_table.html rename : accessible/tests/mochitest/test_table_struct_tree.xul => accessible/tests/mochitest/table/test_struct_tree.xul rename : accessible/tests/mochitest/test_table_1.html => accessible/tests/mochitest/table/test_table_1.html rename : accessible/tests/mochitest/test_table_4.html => accessible/tests/mochitest/table/test_table_2.html
112 lines
2.9 KiB
HTML
112 lines
2.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
|
<script type="application/javascript"
|
|
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
|
<script type="application/javascript"
|
|
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="application/javascript"
|
|
src="chrome://mochikit/content/a11y/accessible/common.js"></script>
|
|
|
|
<script type="application/javascript">
|
|
|
|
function doTest()
|
|
{
|
|
var accTable = getAccessible("table", [nsIAccessibleTable]);
|
|
|
|
var s = window.getSelection();
|
|
if (s.rangeCount > 0)
|
|
s.removeAllRanges();
|
|
|
|
var cell = getNode("col2b");
|
|
var range = document.createRange();
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
|
|
is(accTable.selectedCellCount, 1, "only one cell selected");
|
|
cell = getNode("col2a");
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
cell = getNode("col2c");
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
is(accTable.selectedColumnCount, 1, "only one column selected");
|
|
cell = getNode("row2a");
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
cell = getNode("row2b");
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
cell = getNode("row2c");
|
|
range.selectNode(cell);
|
|
s.addRange(range);
|
|
|
|
is(accTable.selectedRowCount, 1, "no cells selected");
|
|
|
|
var columnDescription;
|
|
works = true;
|
|
try{
|
|
columnDescription = accTable.getColumnDescription(1);
|
|
}
|
|
catch (e) {
|
|
works = false;
|
|
}
|
|
todo(works, "columnDescription should not throw");
|
|
|
|
var rowDescription;
|
|
works = true;
|
|
try {
|
|
rowDescription = accTable.getRowDescription(1);
|
|
}
|
|
catch (e) {
|
|
works = false;
|
|
}
|
|
todo(works, "rowDescription should not throw");
|
|
SimpleTest.finish();
|
|
}
|
|
SimpleTest.waitForExplicitFinish();
|
|
addA11yLoadEvent(doTest);
|
|
</script>
|
|
</head>
|
|
<body >
|
|
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=410052">Mozilla Bug 410052</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none"></div>
|
|
<pre id="test">
|
|
</pre>
|
|
|
|
<!-- Test Table -->
|
|
<br><br><b> Testing Table:</b><br><br>
|
|
<center>
|
|
<table id="table" border="1"
|
|
summary="this is a test table for nsIAccessibleTable" >
|
|
<caption>Test Table</caption>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>columnHeader_1</th>
|
|
<th id ="col2a">columnHeader_2</th>
|
|
<th>columnHeader_3</th>
|
|
</tr>
|
|
</thead>
|
|
<tr>
|
|
<th id="row2a">rowHeader_1</th>
|
|
<td id="row2b">row1_column1</td>
|
|
<td id ="col2b">row1_column2</td>
|
|
<td id="row2c">row1_column3</td>
|
|
</tr>
|
|
<tr>
|
|
<th>rowHeader_2</th>
|
|
<td>row2_column1</td>
|
|
<td id ="col2c">row2_column2</td>
|
|
<td>row2_column3</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|