Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <html>
3 <head>
4 <title>nsIAccessible actions testing for HTML links that
5 scroll the page to named anchors</title>
7 <link rel="stylesheet" type="text/css"
8 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
10 <script type="application/javascript"
11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
13 <script type="application/javascript"
14 src="../common.js"></script>
15 <script type="application/javascript"
16 src="../events.js"></script>
17 <script type="application/javascript"
18 src="../actions.js"></script>
20 <script type="application/javascript">
21 ////////////////////////////////////////////////////////////////////////////
22 // Event checkers
24 function scrollingChecker(aAcc)
25 {
26 this.type = EVENT_SCROLLING_START;
27 this.target = aAcc;
28 this.getID = function scrollingChecker_getID()
29 {
30 return "scrolling start handling for " + prettyName(aAcc);
31 }
32 }
34 ////////////////////////////////////////////////////////////////////////////
35 // Test
37 // gA11yEventDumpID = "debug"; // debug stuff
38 //gA11yEventDumpToConsole = true; // debug stuff
40 function doTest()
41 {
42 var actionsArray = [
43 {
44 ID: "anchor1",
45 actionName: "jump",
46 actionIndex: 0,
47 events: CLICK_EVENTS,
48 eventSeq: [
49 new scrollingChecker(getAccessible("bottom1"))
50 ]
51 },
52 { // jump again (test for bug 437607)
53 ID: "anchor1",
54 actionName: "jump",
55 actionIndex: 0,
56 events: CLICK_EVENTS,
57 eventSeq: [
58 new scrollingChecker(getAccessible("bottom1"))
59 ]
60 },
61 {
62 ID: "anchor2",
63 actionName: "jump",
64 actionIndex: 0,
65 events: CLICK_EVENTS,
66 eventSeq: [
67 new scrollingChecker(getAccessible("bottom2"))
68 ]
69 }
70 ];
72 testActions(actionsArray);
73 }
75 SimpleTest.waitForExplicitFinish();
76 addA11yLoadEvent(doTest);
77 </script>
78 </head>
80 <body>
82 <a target="_blank"
83 href="https://bugzilla.mozilla.org/show_bug.cgi?id=506389"
84 title="Some same page links do not fire EVENT_SYSTEM_SCROLLINGSTART">
85 Mozilla Bug 506389
86 </a><br>
87 <a target="_blank"
88 href="https://bugzilla.mozilla.org/show_bug.cgi?id=437607"
89 title="Clicking the 'Skip to main content' link once works, second time fails to initiate a V cursor jump">
90 Mozilla Bug 437607
91 </a><br>
92 <a target="_blank"
93 href="https://bugzilla.mozilla.org/show_bug.cgi?id=519303"
94 title="Same page links to targets with content fires scrolling start accessible event on leaf text node">
95 Mozilla Bug 519303
96 </a>
98 <p id="display"></p>
99 <div id="content" style="display: none"></div>
100 <pre id="test">
101 </pre>
103 <div id="debug"></div>
105 <h1>This is a test page for anchors</h1>
106 This is a top anchor<a name="Top">
107 </a><a id="anchor1" href="#bottom1">Link to anchor</a>
108 <a id="anchor2" href="#bottom2">Link to div</a>
109 <br><br><br><br><br><br><br><br><br><br>
110 <br><br><br><br><br><br><br><br><br><br>
111 <br><br><br><br><br><br><br><br><br><br>
112 <br><br><br><br><br><br><br><br><br><br>
113 <br><br><br><br><br><br><br><br><br><br>
114 <br><br><br><br><br><br><br><br><br><br>
115 <br><br><br><br><br><br><br><br><br><br>
116 <br><br><br><br><br><br><br><br><br><br>
117 <br><br><br><br><br><br><br><br><br><br>
118 <br><br><br><br><br><br><br><br><br><br>
119 <br><br><br><br><br><br><br><br><br><br><br>
120 <br><br><br><br><br><br><br><br><br><br><br>
121 <br><br><br><br><br><br><br><br><br><br>
122 <br><br><br><br><br><br><br><br><br><br>
123 <br><br><br><br><br>This is some text in the middle<br><br><br><br><br>
124 <br><br><br><br><br><br><br><br><br><br>
125 <br><br><br><br><br><br><br><br><br><br>
126 <br><br><br><br><br><br><br><br><br><br>
127 <br><br><br><br><br><br><br><br><br><br>
128 <br><br><br><br><br><br><br><br><br><br>
129 <br><br><br><br><br><br><br><br><br><br>
130 <br><br><br><br><br><br><br><br><br><br>
131 <br><br><br><br><br><br><br><br><br><br>
132 <br><br><br><br><br><br><br><br><br><br>
133 <br><br><br><br><br><br><br><br><br><br>
134 <br><br><br><br><br><br><br><br><br><br>
135 <br><br><br><br><br><br><br><br><br><br>
136 <br><br><br><br><br><br><br><br><br><br>
137 <br><br><br><br><br><br><br><br><br><br>
138 <br><br><br><br><br><br><br><br><br><br>
139 <br><br><br><br><br><br><br><br><br><br>
140 <br><br><br><br><br><br><br><br><br><br>
141 <br><br><br><br><br><br><br><br><br><br>
142 <br><br><br><br><br><br><br><br><br><br>
143 This is some text.
144 This is a bottom anchor<a id="bottom1"></a>
145 <br><br><br><br><br><br><br><br><br><br>
146 <br><br><br><br><br><br><br><br><br><br>
147 <br><br><br><br><br><br><br><br><br><br>
148 <div id="bottom2">This is a div</div>
149 </body>
150 </html>