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 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>Accessible boundaries when page is zoomed</title>
5 <link rel="stylesheet" type="text/css"
6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
8 <script type="application/javascript"
9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript"
11 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
13 <script type="application/javascript"
14 src="../common.js"></script>
15 <script type="application/javascript"
16 src="../role.js"></script>
17 <script type="application/javascript"
18 src="../layout.js"></script>
19 <script type="application/javascript"
20 src="../events.js"></script>
22 <script type="application/javascript">
23 function openComboboxNCheckBounds(aID)
24 {
25 this.combobox = getAccessible(aID);
26 this.comboboxList = this.combobox.firstChild;
27 this.comboboxOption = this.comboboxList.firstChild;
29 this.eventSeq = [
30 new invokerChecker(EVENT_FOCUS, this.comboboxOption)
31 ];
33 this.invoke = function openComboboxNCheckBounds_invoke()
34 {
35 getNode(aID).focus();
36 synthesizeKey("VK_DOWN", { altKey: true });
37 }
39 this.finalCheck = function openComboboxNCheckBounds_invoke()
40 {
41 testBounds(this.comboboxOption);
42 }
44 this.getID = function openComboboxNCheckBounds_getID()
45 {
46 return "open combobox and test boundaries";
47 }
48 }
50 //gA11yEventDumpToConsole = true;
52 var gQueue = null;
54 function doTest()
55 {
56 // Combobox
57 testBounds("combobox");
59 // Option boundaries matches to combobox boundaries when collapsed.
60 var selectBounds = getBoundsForDOMElm("combobox");
61 testBounds("option1", selectBounds);
63 // Open combobox and test option boundaries.
64 gQueue = new eventQueue();
65 gQueue.push(new openComboboxNCheckBounds("combobox"));
66 gQueue.invoke(); // Will call SimpleTest.finish();
67 }
69 SimpleTest.waitForExplicitFinish();
70 addA11yLoadEvent(doTest);
71 </script>
72 </head>
73 <body>
75 <p id="display"></p>
76 <div id="content" style="display: none"></div>
77 <pre id="test">
78 </pre>
80 <select id="combobox">
81 <option id="option1">item1</option>
82 <option>item2</option>
83 </select>
84 </body>
85 </html>