Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: LayoutTests/accessibility/table-cells-with-colspan.html

Issue 914233002: Use effective columns when cells with colspan are present. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Second attempt to land this patch Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/accessibility/table-cells-with-colspan-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/table-cells-with-colspan.html
diff --git a/LayoutTests/accessibility/table-cells-with-colspan.html b/LayoutTests/accessibility/table-cells-with-colspan.html
new file mode 100644
index 0000000000000000000000000000000000000000..f44f05b019ce107183115d1a73f1e4e251ea0277
--- /dev/null
+++ b/LayoutTests/accessibility/table-cells-with-colspan.html
@@ -0,0 +1,64 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body id="body">
+<table id="table1" border="1">
+ <tr>
+ <td colspan="10">data</td>
+ <th scope="colgroup" colspan="5">col head</td>a
+ <td colspan="2">data</td>
+ </tr>
+</table>
+<table id="table2" border="1">
+ <tr>
+ <td rowspan="2" colspan="3">data</td>
+ <th scope="colgroup" colspan="2">col head</th>
+ </tr>
+ <tr>
+ <th scope="col">col head</th>
+ <th scope="col">col head</th>
+ </tr>
+</table>
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("Check whether cells with colspan are reported properly");
+
+ if (window.accessibilityController) {
+ var table1 = accessibilityController.accessibleElementById("table1");
+ shouldBe("table1.columnCount", "3");
+
+ var cell_0_0 = table1.cellForColumnAndRow(0, 0);
+ shouldBe("cell_0_0.role", "'AXRole: AXCell'");
+ shouldBe("cell_0_0.columnIndexRange()", "'{0, 1}'");
+
+ var cell_0_1 = table1.cellForColumnAndRow(1, 0);
+ shouldBe("cell_0_1.role", "'AXRole: AXColumnHeader'");
+ shouldBe("cell_0_1.columnIndexRange()", "'{1, 1}'");
+
+ var cell_0_2 = table1.cellForColumnAndRow(2, 0);
+ shouldBe("cell_0_2.role", "'AXRole: AXCell'");
+ shouldBe("cell_0_2.columnIndexRange()", "'{2, 1}'");
+
+ var table2 = accessibilityController.accessibleElementById("table2");
+ shouldBe("table2.columnCount", "3");
+ shouldBe("table2.columnHeadersCount", "3");
+
+ var cell_0_1 = table2.cellForColumnAndRow(1, 0)
+ shouldBe("cell_0_1.columnIndexRange()", "'{1, 2}'");
+ var cell_0_2 = table2.cellForColumnAndRow(2, 0);
+ shouldBe("cell_0_2.columnIndexRange()", "'{1, 2}'");
+ shouldBeTrue("table2.columnHeaderAtIndex(0).isEqual(cell_0_1)")
+ shouldBeTrue("table2.columnHeaderAtIndex(0).isEqual(cell_0_2)");
+ shouldBeTrue("table2.columnHeaderAtIndex(1).isEqual(table2.cellForColumnAndRow(1, 1))")
+ shouldBeTrue("table2.columnHeaderAtIndex(2).isEqual(table2.cellForColumnAndRow(2, 1))");
+ }
+
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/accessibility/table-cells-with-colspan-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698