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

Unified Diff: LayoutTests/accessibility/table-headers.html

Issue 799913002: Adding test accessibility/table-headers.html. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years 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-headers-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/accessibility/table-headers.html
diff --git a/LayoutTests/accessibility/table-headers.html b/LayoutTests/accessibility/table-headers.html
new file mode 100644
index 0000000000000000000000000000000000000000..3fc0f360e25762b3ee29928039e2f8da02e328fa
--- /dev/null
+++ b/LayoutTests/accessibility/table-headers.html
@@ -0,0 +1,59 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test.js"></script>
+</head>
+<body id="body">
+
+<table id="table1">
+ <thead>
+ <tr>
+ <th>No</th>
+ <th>Month</th>
+ <th>Expenses</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th>1</th>
+ <td>Jan</td>
+ <td>100</td>
+ </tr>
+ <tr>
+ <th>2</th>
+ <td>Feb</td>
+ <td>150</td>
+ </tr>
+ <tr>
+ <th>3</th>
+ <td>Mar</td>
+ <td>200</td>
+ </tr>
+ </tbody>
+</table>
+
+<p id="description"></p>
+<div id="console"></div>
+
+<script>
+
+ description("Check whether column and row headers are reported correctly");
+
+ if (window.accessibilityController) {
+ var table = accessibilityController.accessibleElementById("table1");
+ // Row headers
+ shouldBeTrue("table.rowHeaderAtIndex(0).isEqual(table.cellForColumnAndRow(0, 0))");
+ shouldBeTrue("table.rowHeaderAtIndex(1).isEqual(table.cellForColumnAndRow(0, 1))");
+ shouldBeTrue("table.rowHeaderAtIndex(2).isEqual(table.cellForColumnAndRow(0, 2))");
+ shouldBeTrue("table.rowHeaderAtIndex(3).isEqual(table.cellForColumnAndRow(0, 3))");
+
+ // Column headers
+ shouldBeTrue("table.columnHeaderAtIndex(0).isEqual(table.cellForColumnAndRow(0, 0))");
+ shouldBeTrue("table.columnHeaderAtIndex(1).isEqual(table.cellForColumnAndRow(1, 0))");
+ shouldBeTrue("table.columnHeaderAtIndex(2).isEqual(table.cellForColumnAndRow(2, 0))");
+ }
+
+</script>
+
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/accessibility/table-headers-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698