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.
1 <html>
2 <head>
3 <title>CSS-like attributes tests</title>
4 <link rel="stylesheet" type="text/css"
5 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
7 <script type="application/javascript"
8 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript"
11 src="../common.js"></script>
12 <script type="application/javascript"
13 src="../attributes.js"></script>
14 <script type="application/javascript"
15 src="../events.js"></script>
17 <script type="application/javascript">
18 var gQueue = null;
20 function removeElm(aID)
21 {
22 this.node = getNode(aID);
23 this.accessible = getAccessible(aID);
25 this.eventSeq = [
26 new invokerChecker(EVENT_HIDE, this.accessible)
27 ];
29 this.invoke = function removeElm_invoke()
30 {
31 this.node.parentNode.removeChild(this.node);
32 }
34 this.check = function removeElm_check()
35 {
36 testAbsentCSSAttrs(this.accessible);
37 }
39 this.getID = function removeElm_getID()
40 {
41 return "test CSS-based attributes on removed accessible";
42 }
43 }
45 function doTest()
46 {
47 // CSS display
48 testCSSAttrs("display_block");
49 testCSSAttrs("display_inline");
50 testCSSAttrs("display_inline-block");
51 testCSSAttrs("display_list-item");
52 testCSSAttrs("display_table");
53 testCSSAttrs("display_inline-table");
54 testCSSAttrs("display_table-row-group");
55 testCSSAttrs("display_table-column");
56 testCSSAttrs("display_table-column-group");
57 testCSSAttrs("display_table-header-group");
58 testCSSAttrs("display_table-footer-group");
59 testCSSAttrs("display_table-row");
60 testCSSAttrs("display_table-cell");
61 testCSSAttrs("display_table-caption");
63 // CSS text-align
64 testCSSAttrs("text-align_left");
65 testCSSAttrs("text-align_right");
66 testCSSAttrs("text-align_center");
67 testCSSAttrs("text-align_justify");
68 testCSSAttrs("text-align_inherit");
70 // CSS text-indent
71 testCSSAttrs("text-indent_em");
72 testCSSAttrs("text-indent_ex");
73 testCSSAttrs("text-indent_in");
74 testCSSAttrs("text-indent_cm");
75 testCSSAttrs("text-indent_mm");
76 testCSSAttrs("text-indent_pt");
77 testCSSAttrs("text-indent_pc");
78 testCSSAttrs("text-indent_px");
79 testCSSAttrs("text-indent_percent");
80 testCSSAttrs("text-indent_inherit");
82 // CSS margin
83 testCSSAttrs("margin_em");
84 testCSSAttrs("margin_ex");
85 testCSSAttrs("margin_in");
86 testCSSAttrs("margin_cm");
87 testCSSAttrs("margin_mm");
88 testCSSAttrs("margin_pt");
89 testCSSAttrs("margin_pc");
90 testCSSAttrs("margin_px");
91 testCSSAttrs("margin_percent");
92 testCSSAttrs("margin_auto");
93 testCSSAttrs("margin_inherit");
95 testCSSAttrs("margin-left");
96 testCSSAttrs("margin-right");
97 testCSSAttrs("margin-top");
98 testCSSAttrs("margin-bottom");
100 // Elements
101 testCSSAttrs("span");
102 testCSSAttrs("div");
103 testCSSAttrs("p");
104 testCSSAttrs("input");
105 testCSSAttrs("table");
106 testCSSAttrs("tr");
107 testCSSAttrs("td");
109 // no CSS-based object attributes
110 testAbsentCSSAttrs(getAccessible("listitem").firstChild);
112 gQueue = new eventQueue();
113 gQueue.push(new removeElm("div"));
114 gQueue.invoke(); // SimpleTest.finish();
115 }
117 SimpleTest.waitForExplicitFinish();
118 addA11yLoadEvent(doTest);
119 </script>
120 </head>
121 <body>
123 <a target="_blank"
124 href="https://bugzilla.mozilla.org/show_bug.cgi?id=439566"
125 title="Include the css display property as an IAccessible2 object attribute">
126 Mozilla Bug 439566
127 </a>
128 <a target="_blank"
129 href="https://bugzilla.mozilla.org/show_bug.cgi?id=460932"
130 title="text-indent and text-align should really be object attribute">
131 Mozilla Bug 460932
132 </a>
133 <a target="_blank"
134 href="https://bugzilla.mozilla.org/show_bug.cgi?id=689540"
135 title="Expose IA2 margin- object attributes">
136 Mozilla Bug 689540
137 </a>
138 <a target="_blank"
139 href="https://bugzilla.mozilla.org/show_bug.cgi?id=714579"
140 title="Don't use GetComputedStyle for object attribute calculation">
141 Mozilla Bug 714579
142 </a>
143 <a target="_blank"
144 href="https://bugzilla.mozilla.org/show_bug.cgi?id=729831"
145 title="Don't expose CSS-based object attributes on not in tree accessible and accessible having no DOM element">
146 Mozilla Bug 729831
147 </a>
149 <p id="display"></p>
150 <div id="content" style="display: none"></div>
151 <pre id="test">
152 </pre>
154 <div id="display_block" role="img"
155 style="display: block;">display: block</div>
156 <div id="display_inline" role="img"
157 style="display: inline;">display: inline</div>
158 <div id="display_inline-block" role="img"
159 style="display: inline-block;">display: inline-block</div>
160 <div id="display_list-item" role="img"
161 style="display: list-item;">display: list-item</div>
162 <div id="display_table" role="img"
163 style="display: table;">display: table</div>
164 <div id="display_inline-table" role="img"
165 style="display: inline-table;">display: inline-table</div>
166 <div id="display_table-row-group" role="img"
167 style="display: table-row-group;">display: table-row-group</div>
168 <div id="display_table-column" role="img"
169 style="display: table-column;">display: table-column</div>
170 <div id="display_table-column-group" role="img"
171 style="display: table-column-group;">display: table-column-group</div>
172 <div id="display_table-header-group" role="img"
173 style="display: table-header-group;">display: table-header-group</div>
174 <div id="display_table-footer-group" role="img"
175 style="display: table-footer-group;">display: table-footer-group</div>
176 <div id="display_table-row" role="img"
177 style="display: table-row;">display: table-row</div>
178 <div id="display_table-cell" role="img"
179 style="display: table-cell;">display: table-cell</div>
180 <div id="display_table-caption" role="img"
181 style="display: table-caption;">display: table-caption</div>
183 <p id="text-align_left" style="text-align: left;">text-align: left</p>
184 <p id="text-align_right" style="text-align: right;">text-align: right</p>
185 <p id="text-align_center" style="text-align: center;">text-align: center</p>
186 <p id="text-align_justify" style="text-align: justify;">text-align: justify</p>
187 <p id="text-align_inherit" style="text-align: inherit;">text-align: inherit</p>
189 <p id="text-indent_em" style="text-indent: 0.5em;">text-indent: 0.5em</p>
190 <p id="text-indent_ex" style="text-indent: 1ex;">text-indent: 1ex</p>
191 <p id="text-indent_in" style="text-indent: 0.5in;">text-indent: 0.5in</p>
192 <p id="text-indent_cm" style="text-indent: 2cm;">text-indent: 2cm</p>
193 <p id="text-indent_mm" style="text-indent: 10mm;">text-indent: 10mm</p>
194 <p id="text-indent_pt" style="text-indent: 30pt;">text-indent: 30pt</p>
195 <p id="text-indent_pc" style="text-indent: 2pc;">text-indent: 2pc</p>
196 <p id="text-indent_px" style="text-indent: 5px;">text-indent: 5px</p>
197 <p id="text-indent_percent" style="text-indent: 10%;">text-indent: 10%</p>
198 <p id="text-indent_inherit" style="text-indent: inherit;">text-indent: inherit</p>
200 <p id="margin_em" style="margin: 0.5em;">margin: 0.5em</p>
201 <p id="margin_ex" style="margin: 1ex;">margin: 1ex</p>
202 <p id="margin_in" style="margin: 0.5in;">margin: 0.5in</p>
203 <p id="margin_cm" style="margin: 2cm;">margin: 2cm</p>
204 <p id="margin_mm" style="margin: 10mm;">margin: 10mm</p>
205 <p id="margin_pt" style="margin: 30pt;">margin: 30pt</p>
206 <p id="margin_pc" style="margin: 2pc;">margin: 2pc</p>
207 <p id="margin_px" style="margin: 5px;">margin: 5px</p>
208 <p id="margin_percent" style="margin: 10%;">margin: 10%</p>
209 <p id="margin_auto" style="margin: auto;">margin: auto</p>
210 <p id="margin_inherit" style="margin: inherit;">margin: inherit</p>
212 <p id="margin-left" style="margin-left: 11px;">margin-left: 11px</p>
213 <p id="margin-right" style="margin-right: 21px;">margin-right</p>
214 <p id="margin-top" style="margin-top: 31px;">margin-top: 31px</p>
215 <p id="margin-bottom" style="margin-bottom: 41px;">margin-bottom: 41px</p>
217 <span id="span" role="group">It's span</span>
218 <div id="div">It's div</div>
219 <p id="p">It's paragraph"</p>
220 <input id="input"/>
221 <table id="table" style="margin: 2px; text-align: center; text-indent: 10%;">
222 <tr id="tr" role="group">
223 <td id="td">td</td>
224 </tr>
225 </table>
227 <ul>
228 <li id="listitem">item
229 </ul>
230 </body>
231 </html>