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 | <html> |
michael@0 | 2 | <!-- |
michael@0 | 3 | https://bugzilla.mozilla.org/show_bug.cgi?id=475006 |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=391829 |
michael@0 | 5 | https://bugzilla.mozilla.org/show_bug.cgi?id=581952 |
michael@0 | 6 | https://bugzilla.mozilla.org/show_bug.cgi?id=558036 |
michael@0 | 7 | --> |
michael@0 | 8 | <head> |
michael@0 | 9 | <title>Group attributes tests</title> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" |
michael@0 | 11 | href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
michael@0 | 12 | |
michael@0 | 13 | <script type="application/javascript" |
michael@0 | 14 | src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 15 | |
michael@0 | 16 | <script type="application/javascript" |
michael@0 | 17 | src="../common.js"></script> |
michael@0 | 18 | <script type="application/javascript" |
michael@0 | 19 | src="../attributes.js"></script> |
michael@0 | 20 | |
michael@0 | 21 | <script type="application/javascript"> |
michael@0 | 22 | function doTest() |
michael@0 | 23 | { |
michael@0 | 24 | // aria |
michael@0 | 25 | testAttrs("atomic", {"atomic" : "true", "container-atomic" : "true"}, true); |
michael@0 | 26 | testAttrs(getNode("atomic").firstChild, {"container-atomic" : "true"}, true); |
michael@0 | 27 | testAbsentAttrs("atomic_false", {"atomic" : "false", "container-atomic" : "false"}); |
michael@0 | 28 | testAbsentAttrs(getNode("atomic_false").firstChild, {"container-atomic" : "false"}); |
michael@0 | 29 | |
michael@0 | 30 | testAttrs("autocomplete", {"autocomplete" : "true"}, true); |
michael@0 | 31 | testAttrs("checkbox", {"checkable" : "true"}, true); |
michael@0 | 32 | testAttrs("checkedCheckbox", {"checkable" : "true"}, true); |
michael@0 | 33 | testAttrs("checkedMenuitem", {"checkable" : "true"}, true); |
michael@0 | 34 | testAttrs("checkedOption", {"checkable" : "true"}, true); |
michael@0 | 35 | testAttrs("checkedRadio", {"checkable" : "true"}, true); |
michael@0 | 36 | testAttrs("checkedTreeitem", {"checkable" : "true"}, true); |
michael@0 | 37 | testAttrs("dropeffect", {"dropeffect" : "copy"}, true); |
michael@0 | 38 | testAttrs("grabbed", {"grabbed" : "true"}, true); |
michael@0 | 39 | testAttrs("hidden", {"hidden" : "true"}, true); |
michael@0 | 40 | testAbsentAttrs("hidden_false", { "hidden": "false" }); |
michael@0 | 41 | testAttrs("sortAscending", {"sort" : "ascending"}, true); |
michael@0 | 42 | testAttrs("sortDescending", {"sort" : "descending"}, true); |
michael@0 | 43 | testAttrs("sortNone", {"sort" : "none"}, true); |
michael@0 | 44 | testAttrs("sortOther", {"sort" : "other"}, true); |
michael@0 | 45 | |
michael@0 | 46 | // inherited attributes by subdocuments |
michael@0 | 47 | var subdoc = getAccessible("iframe").firstChild; |
michael@0 | 48 | testAttrs(subdoc, {"busy" : "true"}, true); |
michael@0 | 49 | |
michael@0 | 50 | // live object attribute |
michael@0 | 51 | |
michael@0 | 52 | // HTML |
michael@0 | 53 | testAttrs("output", {"live" : "polite"}, true); |
michael@0 | 54 | |
michael@0 | 55 | // ARIA |
michael@0 | 56 | testAttrs("live", {"live" : "polite"}, true); |
michael@0 | 57 | testAttrs("live2", {"live" : "polite"}, true); |
michael@0 | 58 | testAbsentAttrs("live3", {"live" : ""}); |
michael@0 | 59 | testAttrs("log", {"live" : "polite"}, true); |
michael@0 | 60 | testAttrs("logAssertive", {"live" : "assertive"}, true); |
michael@0 | 61 | testAttrs("marquee", {"live" : "off"}, true); |
michael@0 | 62 | testAttrs("status", {"live" : "polite"}, true); |
michael@0 | 63 | testAttrs("timer", {"live" : "off"}, true); |
michael@0 | 64 | testAbsentAttrs("tablist", {"live" : "polite"}); |
michael@0 | 65 | |
michael@0 | 66 | // container-live object attribute |
michael@0 | 67 | testAttrs("liveChild", {"container-live" : "polite"}, true); |
michael@0 | 68 | testAttrs("live2Child", {"container-live" : "polite"}, true); |
michael@0 | 69 | testAttrs("logChild", {"container-live" : "polite"}, true); |
michael@0 | 70 | testAttrs("logAssertiveChild", {"container-live" : "assertive"}, true); |
michael@0 | 71 | testAttrs("marqueeChild", {"container-live" : "off"}, true); |
michael@0 | 72 | testAttrs("statusChild", {"container-live" : "polite"}, true); |
michael@0 | 73 | testAttrs("timerChild", {"container-live" : "off"}, true); |
michael@0 | 74 | testAbsentAttrs("tablistChild", {"container-live" : "polite"}); |
michael@0 | 75 | |
michael@0 | 76 | // container-live-role object attribute |
michael@0 | 77 | testAttrs("log", {"container-live-role" : "log"}, true); |
michael@0 | 78 | testAttrs("logAssertive", {"container-live-role" : "log"}, true); |
michael@0 | 79 | testAttrs("marquee", {"container-live-role" : "marquee"}, true); |
michael@0 | 80 | testAttrs("status", {"container-live-role" : "status"}, true); |
michael@0 | 81 | testAttrs("timer", {"container-live-role" : "timer"}, true); |
michael@0 | 82 | testAttrs("logChild", {"container-live-role" : "log"}, true); |
michael@0 | 83 | testAttrs("logAssertive", {"container-live-role" : "log"}, true); |
michael@0 | 84 | testAttrs("logAssertiveChild", {"container-live-role" : "log"}, true); |
michael@0 | 85 | testAttrs("marqueeChild", {"container-live-role" : "marquee"}, true); |
michael@0 | 86 | testAttrs("statusChild", {"container-live-role" : "status"}, true); |
michael@0 | 87 | testAttrs("timerChild", {"container-live-role" : "timer"}, true); |
michael@0 | 88 | testAbsentAttrs("tablistChild", {"container-live-role" : "tablist"}); |
michael@0 | 89 | |
michael@0 | 90 | // absent aria-label and aria-labelledby object attribute |
michael@0 | 91 | testAbsentAttrs("label", {"label" : "foo"}); |
michael@0 | 92 | testAbsentAttrs("labelledby", {"labelledby" : "label"}); |
michael@0 | 93 | |
michael@0 | 94 | // container that has no default live attribute |
michael@0 | 95 | testAttrs("liveGroup", {"live" : "polite"}, true); |
michael@0 | 96 | testAttrs("liveGroupChild", {"container-live" : "polite"}, true); |
michael@0 | 97 | testAttrs("liveGroup", {"container-live-role" : "group"}, true); |
michael@0 | 98 | testAttrs("liveGroupChild", {"container-live-role" : "group"}, true); |
michael@0 | 99 | |
michael@0 | 100 | // text input type |
michael@0 | 101 | testAbsentAttrs("button", { "text-input-type": "button"}); |
michael@0 | 102 | testAbsentAttrs("checkbox", { "text-input-type": "checkbox"}); |
michael@0 | 103 | testAbsentAttrs("radio", { "text-input-type": "radio"}); |
michael@0 | 104 | testAttrs("email", {"text-input-type" : "email"}, true); |
michael@0 | 105 | testAttrs("search", {"text-input-type" : "search"}, true); |
michael@0 | 106 | testAttrs("tel", {"text-input-type" : "tel"}, true); |
michael@0 | 107 | testAttrs("url", {"text-input-type" : "url"}, true); |
michael@0 | 108 | |
michael@0 | 109 | // html |
michael@0 | 110 | testAttrs("radio", {"checkable" : "true"}, true); |
michael@0 | 111 | testAttrs("checkbox", {"checkable" : "true"}, true); |
michael@0 | 112 | testAttrs("draggable", {"draggable" : "true"}, true); |
michael@0 | 113 | testAttrs("th1", { "abbr": "SS#" }, true); |
michael@0 | 114 | testAttrs("th2", { "abbr": "SS#" }, true); |
michael@0 | 115 | testAttrs("th2", { "axis": "social" }, true); |
michael@0 | 116 | |
michael@0 | 117 | // don't barf on an empty abbr element. |
michael@0 | 118 | testAbsentAttrs("th3", { "abbr": "" }, true); |
michael@0 | 119 | |
michael@0 | 120 | // application accessible |
michael@0 | 121 | if (WIN) { |
michael@0 | 122 | var gfxInfo = Components.classes["@mozilla.org/gfx/info;1"]. |
michael@0 | 123 | getService(Components.interfaces.nsIGfxInfo); |
michael@0 | 124 | var attrs = { |
michael@0 | 125 | "D2D": (gfxInfo.D2DEnabled ? "true" : "false") |
michael@0 | 126 | } |
michael@0 | 127 | testAttrs(getApplicationAccessible(), attrs, false); |
michael@0 | 128 | } |
michael@0 | 129 | |
michael@0 | 130 | // no object attributes |
michael@0 | 131 | testAbsentAttrs(getAccessible("listitem").firstChild, { "tag": "" }); |
michael@0 | 132 | |
michael@0 | 133 | // experimental aria |
michael@0 | 134 | testAttrs("experimental", {"blah" : "true"}, true); |
michael@0 | 135 | |
michael@0 | 136 | SimpleTest.finish(); |
michael@0 | 137 | } |
michael@0 | 138 | |
michael@0 | 139 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 140 | addA11yLoadEvent(doTest); |
michael@0 | 141 | </script> |
michael@0 | 142 | </head> |
michael@0 | 143 | <body> |
michael@0 | 144 | <a target="_blank" |
michael@0 | 145 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=475006" |
michael@0 | 146 | title="Extend nsARIAMap to capture ARIA attribute characteristics"> |
michael@0 | 147 | Mozilla Bug 475006 |
michael@0 | 148 | </a> |
michael@0 | 149 | <a target="_blank" |
michael@0 | 150 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=391829" |
michael@0 | 151 | title="Add support for container-live-role to object attributes"> |
michael@0 | 152 | Mozilla Bug 391829 |
michael@0 | 153 | </a> |
michael@0 | 154 | <a target="_blank" |
michael@0 | 155 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=581952" |
michael@0 | 156 | title="Make explicit that aria-label is not an object attribute"> |
michael@0 | 157 | Mozilla Bug 475006 |
michael@0 | 158 | </a> |
michael@0 | 159 | <a target="_blank" |
michael@0 | 160 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=558036" |
michael@0 | 161 | title="make HTML <output> accessible"> |
michael@0 | 162 | Mozilla Bug 558036 |
michael@0 | 163 | </a> |
michael@0 | 164 | <a target="_blank" |
michael@0 | 165 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=896400" |
michael@0 | 166 | title="Tablist should no longer be an implicit live region"> |
michael@0 | 167 | Mozilla Bug 896400 |
michael@0 | 168 | </a> |
michael@0 | 169 | <a target="_blank" |
michael@0 | 170 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=563862" |
michael@0 | 171 | title="Expand support for nsIAccessibleEvent::OBJECT_ATTRIBUTE_CHANGE"> |
michael@0 | 172 | Mozilla Bug 563862 |
michael@0 | 173 | </a> |
michael@0 | 174 | <a target="_blank" |
michael@0 | 175 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=819303" |
michael@0 | 176 | title="crash in nsTextEquivUtils::AppendTextEquivFromTextContent"> |
michael@0 | 177 | Mozilla Bug 819303 |
michael@0 | 178 | </a> |
michael@0 | 179 | <a target="_blank" |
michael@0 | 180 | href="https://bugzilla.mozilla.org/show_bug.cgi?id=838407" |
michael@0 | 181 | title="aria-hidden false value shouldn't be exposed via object attributes"> |
michael@0 | 182 | Mozilla Bug 838407 |
michael@0 | 183 | </a> |
michael@0 | 184 | <p id="display"></p> |
michael@0 | 185 | <div id="content" style="display: none"></div> |
michael@0 | 186 | <pre id="test"> |
michael@0 | 187 | </pre> |
michael@0 | 188 | |
michael@0 | 189 | <!-- aria --> |
michael@0 | 190 | <div id="atomic" aria-atomic="true">live region</div> |
michael@0 | 191 | <div id="atomic_false" aria-atomic="false">live region</div> |
michael@0 | 192 | <div id="autocomplete" role="textbox" aria-autocomplete="true"></div> |
michael@0 | 193 | <div id="checkbox" role="checkbox"></div> |
michael@0 | 194 | <div id="checkedCheckbox" role="checkbox" aria-checked="true"></div> |
michael@0 | 195 | <div id="checkedMenuitem" role="menuitem" aria-checked="true"></div> |
michael@0 | 196 | <div id="checkedOption" role="option" aria-checked="true"></div> |
michael@0 | 197 | <div id="checkedRadio" role="radio" aria-checked="true"></div> |
michael@0 | 198 | <div id="checkedTreeitem" role="treeitem" aria-checked="true"></div> |
michael@0 | 199 | <div id="dropeffect" aria-dropeffect="copy"></div> |
michael@0 | 200 | <div id="grabbed" aria-grabbed="true"></div> |
michael@0 | 201 | <div id="hidden" aria-hidden="true"></div> |
michael@0 | 202 | <div id="hidden_false" aria-hidden="false"></div> |
michael@0 | 203 | <div id="sortAscending" role="columnheader" aria-sort="ascending"></div> |
michael@0 | 204 | <div id="sortDescending" role="columnheader" aria-sort="descending"></div> |
michael@0 | 205 | <div id="sortNone" role="columnheader" aria-sort="none"></div> |
michael@0 | 206 | <div id="sortOther" role="columnheader" aria-sort="other"></div> |
michael@0 | 207 | |
michael@0 | 208 | <!-- inherited from iframe --> |
michael@0 | 209 | <iframe id="iframe" src="data:text/html,<html><body></body></html>" |
michael@0 | 210 | aria-busy="true"></iframe> |
michael@0 | 211 | |
michael@0 | 212 | <!-- html --> |
michael@0 | 213 | <output id="output"></output> |
michael@0 | 214 | |
michael@0 | 215 | <!-- back to aria --> |
michael@0 | 216 | <div id="live" aria-live="polite">excuse <div id="liveChild">me</div></div> |
michael@0 | 217 | <div id="live2" role="marquee" aria-live="polite">excuse <div id="live2Child">me</div></div> |
michael@0 | 218 | <div id="live3" role="region">excuse</div> |
michael@0 | 219 | <div id="log" role="log">excuse <div id="logChild">me</div></div> |
michael@0 | 220 | <div id="logAssertive" role="log" aria-live="assertive">excuse <div id="logAssertiveChild">me</div></div> |
michael@0 | 221 | <div id="marquee" role="marquee">excuse <div id="marqueeChild">me</div></div> |
michael@0 | 222 | <div id="status" role="status">excuse <div id="statusChild">me</div></div> |
michael@0 | 223 | <div id="tablist" role="tablist">tablist <div id="tablistChild">tab</div></div> |
michael@0 | 224 | <div id="timer" role="timer">excuse <div id="timerChild">me</div></div> |
michael@0 | 225 | |
michael@0 | 226 | <!-- aria-label[ledby] should not be an object attribute --> |
michael@0 | 227 | <div id="label" role="checkbox" aria-label="foo"></div> |
michael@0 | 228 | <div id="labelledby" role="checkbox" aria-labelledby="label"></div> |
michael@0 | 229 | |
michael@0 | 230 | <!-- unusual live case --> |
michael@0 | 231 | <div id="liveGroup" role="group" aria-live="polite"> |
michael@0 | 232 | excuse <div id="liveGroupChild">me</div> |
michael@0 | 233 | </div> |
michael@0 | 234 | |
michael@0 | 235 | <!-- text input type --> |
michael@0 | 236 | <input id="button" type="button"/> |
michael@0 | 237 | <input id="email" type="email"/> |
michael@0 | 238 | <input id="search" type="search"/> |
michael@0 | 239 | <input id="tel" type="tel"/> |
michael@0 | 240 | <input id="url" type="url"/> |
michael@0 | 241 | |
michael@0 | 242 | <!-- html --> |
michael@0 | 243 | <input id="radio" type="radio"/> |
michael@0 | 244 | <input id="checkbox" type="checkbox"/> |
michael@0 | 245 | <div id="draggable" draggable="true">Draggable div</div> |
michael@0 | 246 | <table> |
michael@0 | 247 | <tr> |
michael@0 | 248 | <th id="th1"><abbr title="Social Security Number">SS#</abbr></th> |
michael@0 | 249 | <th id="th2" abbr="SS#" axis="social">Social Security Number</th> |
michael@0 | 250 | <th id="th3"><abbr></abbr></th> |
michael@0 | 251 | </tr> |
michael@0 | 252 | </table> |
michael@0 | 253 | |
michael@0 | 254 | <ul> |
michael@0 | 255 | <li id="listitem">item |
michael@0 | 256 | </ul> |
michael@0 | 257 | |
michael@0 | 258 | <!-- experimental aria --> |
michael@0 | 259 | <div id="experimental" aria-blah="true">Fake beer</div> |
michael@0 | 260 | </body> |
michael@0 | 261 | </html> |