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
144 lines
4.3 KiB
HTML
144 lines
4.3 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"
|
|
src="chrome://mochikit/content/a11y/accessible/role.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function doTest()
|
|
{
|
|
// Test table with display:inline. We shouldn't create table accessible and
|
|
// table cell accessible in this case
|
|
var accNotCreated = (!isAccessible("table1"));
|
|
ok(accNotCreated, "wrongly created table accessible");
|
|
|
|
if (accNotCreated) {
|
|
var accDiv = getAccessible("div");
|
|
is(accDiv.firstChild.name, "cell", "wrongly created table cell accessible");
|
|
}
|
|
|
|
// Test table with display:inline and have an another outside table
|
|
accNotCreated = (!isAccessible("table2"));
|
|
ok(accNotCreated, "wrongly created table accessible");
|
|
|
|
accNotCreated = (!isAccessible("cell"));
|
|
ok(accNotCreated, "wrongly created table cell accessible");
|
|
|
|
// Test table with role=alert.
|
|
var tableInterfaceExposed = true;
|
|
var accTable3 = getAccessible("table3", [nsIAccessibleTable], null, DONOTFAIL_IF_NO_INTERFACE);
|
|
if (!accTable3)
|
|
tableInterfaceExposed = false;
|
|
ok(tableInterfaceExposed, "table interface is not exposed");
|
|
|
|
if (tableInterfaceExposed) {
|
|
testRole(accTable3, ROLE_ALERT);
|
|
|
|
is(accTable3.getCellAt(0,0).firstChild.name, "cell0", "wrong cell");
|
|
is(accTable3.getCellAt(0,1).firstChild.name, "cell1", "wrong cell");
|
|
}
|
|
|
|
// Test table with role=log and aria property in tr. We create accessible for
|
|
// tr in this case.
|
|
tableInterfaceExposed = true;
|
|
var accTable4 = getAccessible("table4", [nsIAccessibleTable], null, DONOTFAIL_IF_NO_INTERFACE);
|
|
if (!accTable4)
|
|
tableInterfaceExposed = false;
|
|
ok(tableInterfaceExposed, "table interface is not exposed");
|
|
|
|
if (tableInterfaceExposed) {
|
|
accNotCreated = (!isAccessible("tr"));
|
|
ok(!accNotCreated, "missed tr accessible");
|
|
|
|
testRole(accTable4, ROLE_TABLE);
|
|
|
|
is(accTable4.getCellAt(0,0).firstChild.name, "cell0", "wrong cell");
|
|
is(accTable4.getCellAt(0,1).firstChild.name, "cell1", "wrong cell");
|
|
is(accTable4.getCellAt(1,0).firstChild.name, "cell2", "wrong cell");
|
|
is(accTable4.getCellAt(1,1).firstChild.name, "cell3", "wrong cell");
|
|
}
|
|
|
|
// Test table with display:inline and an outside table. We shouldn't be fooled
|
|
// by the outside table and shouldn't create table accessible and table cell
|
|
// accessible in this case
|
|
accNotCreated = (!isAccessible("table5"));
|
|
ok(accNotCreated, "wrongly created table accessible");
|
|
accNotCreated = (!isAccessible("t5_cell"));
|
|
ok(accNotCreated, "wrongly created table cell accessible");
|
|
|
|
SimpleTest.finish();
|
|
}
|
|
SimpleTest.waitForExplicitFinish();
|
|
addA11yLoadEvent(doTest);
|
|
</script>
|
|
</head>
|
|
|
|
<body >
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=419811">Mozilla Bug 419811</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>
|
|
<div id="div">
|
|
<table id="table1" border="1" style="display:inline">
|
|
<tr>
|
|
<td>cell</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<table><tr><td>
|
|
<table id="table2" border="1" style="display:inline">
|
|
<tr>
|
|
<td id="cell">cell</td>
|
|
</tr>
|
|
</table>
|
|
</td></tr></table>
|
|
|
|
<table id="table3" border="1" role="alert">
|
|
<tr>
|
|
<td>cell0</td>
|
|
<td>cell1</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table id="table4" border="1" role="log">
|
|
<tr aria-live="polite" id="tr">
|
|
<td>cell0</td>
|
|
<td>cell1</td>
|
|
</tr>
|
|
<tr>
|
|
<td>cell2</td>
|
|
<td>cell3</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table>
|
|
<tr>
|
|
<td style="display:block">
|
|
<table style="display:inline" id="table5">
|
|
<tr><td id="t5_cell">cell0</td></tr>
|
|
</table>
|
|
</td>
|
|
<td>cell1</td>
|
|
</tr>
|
|
</table>
|
|
|
|
</center>
|
|
</body>
|
|
</html>
|