accessible/tests/mochitest/table/test_headers_ariagrid.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Table header information cells for ARIA grid</title>
michael@0 5 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
michael@0 6 <link rel="stylesheet" type="text/css"
michael@0 7 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 8
michael@0 9 <script type="application/javascript"
michael@0 10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 11
michael@0 12 <script type="application/javascript"
michael@0 13 src="../common.js"></script>
michael@0 14 <script type="application/javascript"
michael@0 15 src="../table.js"></script>
michael@0 16
michael@0 17 <script type="application/javascript">
michael@0 18
michael@0 19 function doTest()
michael@0 20 {
michael@0 21 //////////////////////////////////////////////////////////////////////////
michael@0 22 // column and row headers from markup
michael@0 23
michael@0 24 headerInfoMap = [
michael@0 25 {
michael@0 26 cell: "table_dc_1",
michael@0 27 rowHeaderCells: [ "table_rh_1" ],
michael@0 28 columnHeaderCells: [ "table_ch_2" ]
michael@0 29 },
michael@0 30 {
michael@0 31 cell: "table_dc_2",
michael@0 32 rowHeaderCells: [ "table_rh_1" ],
michael@0 33 columnHeaderCells: [ "table_ch_3" ]
michael@0 34 },
michael@0 35 {
michael@0 36 cell: "table_dc_3",
michael@0 37 rowHeaderCells: [ "table_rh_2" ],
michael@0 38 columnHeaderCells: [ "table_ch_2" ]
michael@0 39 },
michael@0 40 {
michael@0 41 cell: "table_dc_4",
michael@0 42 rowHeaderCells: [ "table_rh_2" ],
michael@0 43 columnHeaderCells: [ "table_ch_3" ]
michael@0 44 },
michael@0 45 {
michael@0 46 cell: "table_rh_1",
michael@0 47 rowHeaderCells: [],
michael@0 48 columnHeaderCells: [ "table_ch_1" ]
michael@0 49 },
michael@0 50 {
michael@0 51 cell: "table_rh_2",
michael@0 52 rowHeaderCells: [],
michael@0 53 columnHeaderCells: [ "table_ch_1" ]
michael@0 54 }
michael@0 55 ];
michael@0 56
michael@0 57 testHeaderCells(headerInfoMap);
michael@0 58
michael@0 59
michael@0 60 //////////////////////////////////////////////////////////////////////////
michael@0 61 // column and row headers from markup for crazy grid.
michael@0 62
michael@0 63 headerInfoMap = [
michael@0 64 {
michael@0 65 // not focusable cell (nsARIAGridCellAccessible is used)
michael@0 66 cell: "table2_dc_1",
michael@0 67 rowHeaderCells: [],
michael@0 68 columnHeaderCells: [ "table2_ch_1" ]
michael@0 69 },
michael@0 70 {
michael@0 71 // focusable cell (nsARIAGridCellAccessible is used)
michael@0 72 cell: "table2_dc_2",
michael@0 73 rowHeaderCells: [],
michael@0 74 columnHeaderCells: [ "table2_ch_2" ]
michael@0 75 }
michael@0 76 ];
michael@0 77
michael@0 78 testHeaderCells(headerInfoMap);
michael@0 79
michael@0 80 SimpleTest.finish();
michael@0 81 }
michael@0 82
michael@0 83 SimpleTest.waitForExplicitFinish();
michael@0 84 addA11yLoadEvent(doTest);
michael@0 85 </script>
michael@0 86 </head>
michael@0 87
michael@0 88 <body>
michael@0 89 <a target="_blank"
michael@0 90 title="implement IAccessibleTable2"
michael@0 91 href="https://bugzilla.mozilla.org/show_bug.cgi?id=512424">Mozilla Bug 512424</a>
michael@0 92 <a target="_blank"
michael@0 93 title="nsHTMLTableCellAccessible is used in dojo's crazy ARIA grid"
michael@0 94 href="https://bugzilla.mozilla.org/show_bug.cgi?id=513848">Mozilla Bug 513848</a>
michael@0 95
michael@0 96 <p id="display"></p>
michael@0 97 <div id="content" style="display: none"></div>
michael@0 98 <pre id="test">
michael@0 99 </pre>
michael@0 100
michael@0 101 <div role="grid">
michael@0 102 <div role="row">
michael@0 103 <span id="table_ch_1" role="columnheader">col_1</span>
michael@0 104 <span id="table_ch_2" role="columnheader">col_2</span>
michael@0 105 <span id="table_ch_3" role="columnheader">col_3</span>
michael@0 106 </div>
michael@0 107 <div role="row">
michael@0 108 <span id="table_rh_1" role="rowheader">row_1</span>
michael@0 109 <span id="table_dc_1" role="gridcell">cell1</span>
michael@0 110 <span id="table_dc_2" role="gridcell">cell2</span>
michael@0 111 </div>
michael@0 112 <div role="row">
michael@0 113 <span id="table_rh_2" role="rowheader">row_2</span>
michael@0 114 <span id="table_dc_3" role="gridcell">cell3</span>
michael@0 115 <span id="table_dc_4" role="gridcell">cell4</span>
michael@0 116 </div>
michael@0 117 </div>
michael@0 118
michael@0 119 <div role="grid">
michael@0 120 <div role="row">
michael@0 121 <table role="presentation">
michael@0 122 <tr>
michael@0 123 <td id="table2_ch_1" role="columnheader">header1</td>
michael@0 124 <td id="table2_ch_2" role="columnheader">header2</td>
michael@0 125 </tr>
michael@0 126 </table>
michael@0 127 </div>
michael@0 128 <div role="row">
michael@0 129 <table role="presentation">
michael@0 130 <tr>
michael@0 131 <td id="table2_dc_1" role="gridcell">cell1</td>
michael@0 132 <td id="table2_dc_2" role="gridcell" tabindex="-1">cell2</td>
michael@0 133 </tr>
michael@0 134 </table>
michael@0 135 </div>
michael@0 136 </div>
michael@0 137
michael@0 138 </body>
michael@0 139 </html>

mercurial