Tue, 06 Jan 2015 21:39:09 +0100
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> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test accessible tree when ARIA role presentation is used</title> |
michael@0 | 5 | <link rel="stylesheet" type="text/css" |
michael@0 | 6 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" |
michael@0 | 9 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 10 | <script type="application/javascript" |
michael@0 | 11 | src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 12 | |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="../common.js"></script> |
michael@0 | 15 | <script type="application/javascript" |
michael@0 | 16 | src="../role.js"></script> |
michael@0 | 17 | |
michael@0 | 18 | <script type="application/javascript"> |
michael@0 | 19 | function doTest() |
michael@0 | 20 | { |
michael@0 | 21 | // Presentation role don't allow accessible. |
michael@0 | 22 | var tree = |
michael@0 | 23 | { SECTION: [ // container |
michael@0 | 24 | { TEXT_LEAF: [ ] } // child text of presentation node |
michael@0 | 25 | ] }; |
michael@0 | 26 | testAccessibleTree("div_cnt", tree); |
michael@0 | 27 | |
michael@0 | 28 | // Focusable element, presentation role is ignored. |
michael@0 | 29 | tree = |
michael@0 | 30 | { SECTION: [ // container |
michael@0 | 31 | { PUSHBUTTON: [ // button |
michael@0 | 32 | { TEXT_LEAF: [ ] } |
michael@0 | 33 | ] } |
michael@0 | 34 | ] }; |
michael@0 | 35 | testAccessibleTree("btn_cnt", tree); |
michael@0 | 36 | |
michael@0 | 37 | // Presentation table, no table structure is exposed. |
michael@0 | 38 | tree = |
michael@0 | 39 | { SECTION: [ // container |
michael@0 | 40 | { TEXT_CONTAINER: [ // td generic accessible |
michael@0 | 41 | { TEXT_LEAF: [ ] } // cell text |
michael@0 | 42 | ] } |
michael@0 | 43 | ] }; |
michael@0 | 44 | testAccessibleTree("tbl_cnt", tree); |
michael@0 | 45 | |
michael@0 | 46 | // Focusable table, presentation role is ignored. |
michael@0 | 47 | tree = |
michael@0 | 48 | { SECTION: [ // container |
michael@0 | 49 | { TABLE: [ // table |
michael@0 | 50 | { ROW: [ // tr |
michael@0 | 51 | { CELL: [ //td |
michael@0 | 52 | { TEXT_LEAF: [ ] } |
michael@0 | 53 | ] } |
michael@0 | 54 | ] } |
michael@0 | 55 | ] } |
michael@0 | 56 | ] }; |
michael@0 | 57 | testAccessibleTree("tblfocusable_cnt", tree); |
michael@0 | 58 | |
michael@0 | 59 | // Has ARIA globals or referred by ARIA relationship. |
michael@0 | 60 | tree = |
michael@0 | 61 | { SECTION: [ // container |
michael@0 | 62 | { LABEL: [ // label, has aria-owns |
michael@0 | 63 | { TEXT_LEAF: [ ] } |
michael@0 | 64 | ] }, |
michael@0 | 65 | { TEXT_LEAF: [ ] }, |
michael@0 | 66 | { LABEL: [ // label, referenced by aria-owns |
michael@0 | 67 | { TEXT_LEAF: [ ] } |
michael@0 | 68 | ] } |
michael@0 | 69 | ] }; |
michael@0 | 70 | testAccessibleTree("airaglobalprop_cnt", tree); |
michael@0 | 71 | |
michael@0 | 72 | SimpleTest.finish(); |
michael@0 | 73 | } |
michael@0 | 74 | |
michael@0 | 75 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 76 | addA11yLoadEvent(doTest); |
michael@0 | 77 | </script> |
michael@0 | 78 | </head> |
michael@0 | 79 | <body> |
michael@0 | 80 | |
michael@0 | 81 | <a target="_blank" |
michael@0 | 82 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=548291" |
michael@0 | 83 | title="Accessible tree of ARIA image maps"> |
michael@0 | 84 | Mozilla Bug 548291 |
michael@0 | 85 | </a> |
michael@0 | 86 | <a target="_blank" |
michael@0 | 87 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=666504" |
michael@0 | 88 | title="Ignore role presentation on focusable elements"> |
michael@0 | 89 | Mozilla Bug 666504 |
michael@0 | 90 | </a> |
michael@0 | 91 | <p id="display"></p> |
michael@0 | 92 | <div id="content" style="display: none"></div> |
michael@0 | 93 | <pre id="test"> |
michael@0 | 94 | </pre> |
michael@0 | 95 | |
michael@0 | 96 | <div id="div_cnt"><div role="presentation">text</div></div> |
michael@0 | 97 | |
michael@0 | 98 | <div id="btn_cnt"><button role="presentation">btn</button></div> |
michael@0 | 99 | |
michael@0 | 100 | <div id="tbl_cnt"> |
michael@0 | 101 | <table role="presentation"> |
michael@0 | 102 | <tr> |
michael@0 | 103 | <td>cell</td> |
michael@0 | 104 | </tr> |
michael@0 | 105 | </table> |
michael@0 | 106 | </div> |
michael@0 | 107 | |
michael@0 | 108 | <div id="tblfocusable_cnt"> |
michael@0 | 109 | <table role="presentation" tabindex="0"> |
michael@0 | 110 | <tr> |
michael@0 | 111 | <td>cell</td> |
michael@0 | 112 | </tr> |
michael@0 | 113 | </table> |
michael@0 | 114 | </div> |
michael@0 | 115 | |
michael@0 | 116 | <div id="airaglobalprop_cnt"> |
michael@0 | 117 | <label role="presentation" aria-owns="ariaowned">has aria-owns</label> |
michael@0 | 118 | <label role="presentation" id="ariaowned">referred by aria-owns</label> |
michael@0 | 119 | </div> |
michael@0 | 120 | |
michael@0 | 121 | </body> |
michael@0 | 122 | </html> |