Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <html>
3 <head>
4 <title>Accessible description change event testing</title>
6 <link rel="stylesheet" type="text/css"
7 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
9 <script type="application/javascript"
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
11 <script type="application/javascript"
12 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
14 <script type="application/javascript"
15 src="../common.js"></script>
16 <script type="application/javascript"
17 src="../events.js"></script>
18 <script type="application/javascript"
19 src="../role.js"></script>
20 <script type="application/javascript"
21 src="../states.js"></script>
23 <script type="application/javascript">
24 ////////////////////////////////////////////////////////////////////////////
25 // Invokers
27 function setAttr(aID, aAttr, aValue, aChecker)
28 {
29 this.eventSeq = [ aChecker ];
30 this.invoke = function setAttr_invoke()
31 {
32 getNode(aID).setAttribute(aAttr, aValue);
33 }
35 this.getID = function setAttr_getID()
36 {
37 return "set attr '" + aAttr + "', value '" + aValue + "'";
38 }
39 }
41 ////////////////////////////////////////////////////////////////////////////
42 // Do tests
44 //gA11yEventDumpToConsole = true; // debuggin
46 var gQueue = null;
47 function doTests()
48 {
49 gQueue = new eventQueue();
51 gQueue.push(new setAttr("tst1", "aria-describedby", "display",
52 new invokerChecker(EVENT_DESCRIPTION_CHANGE, "tst1")));
53 gQueue.push(new setAttr("tst1", "title", "title",
54 new unexpectedInvokerChecker(EVENT_DESCRIPTION_CHANGE, "tst1")));
56 gQueue.push(new setAttr("tst2", "title", "title",
57 new invokerChecker(EVENT_NAME_CHANGE, "tst2")));
59 gQueue.invoke(); // Will call SimpleTest.finish();
60 }
62 SimpleTest.waitForExplicitFinish();
63 addA11yLoadEvent(doTests);
64 </script>
65 </head>
67 <body>
69 <a target="_blank"
70 href="https://bugzilla.mozilla.org/show_bug.cgi?id=991969"
71 title="Event not fired when description changes">
72 Bug 991969
73 </a>
75 <p id="display"></p>
76 <div id="content" style="display: none"></div>
77 <pre id="test">
78 </pre>
80 <button id="tst1">btn1</button>
81 <button id="tst2">btn2</button>
83 <div id="eventdump"></div>
84 </body>
85 </html>