|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
|
3 |
|
4 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
|
5 type="text/css"?> |
|
6 |
|
7 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
|
8 |
|
9 <script type="application/javascript" |
|
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" /> |
|
11 <script type="application/javascript" |
|
12 src="chrome://mochikit/content/chrome-harness.js"/> |
|
13 |
|
14 <script type="application/javascript" |
|
15 src="../common.js" /> |
|
16 <script type="application/javascript" |
|
17 src="../events.js" /> |
|
18 |
|
19 <script type="application/javascript"> |
|
20 <![CDATA[ |
|
21 |
|
22 /** |
|
23 * Check name changed a11y event. |
|
24 */ |
|
25 function nameChangeChecker(aMsg, aID) |
|
26 { |
|
27 this.type = EVENT_NAME_CHANGE; |
|
28 |
|
29 function targetGetter() |
|
30 { |
|
31 return getAccessible(aID); |
|
32 } |
|
33 Object.defineProperty(this, "target", { get: targetGetter }); |
|
34 |
|
35 this.getID = function getID() |
|
36 { |
|
37 return aMsg + " name changed"; |
|
38 } |
|
39 } |
|
40 |
|
41 function changeRichListItemChild() |
|
42 { |
|
43 this.invoke = function changeRichListItemChild_invoke() |
|
44 { |
|
45 getNode('childcontent').setAttribute('value', 'Changed.'); |
|
46 } |
|
47 |
|
48 this.eventSeq = |
|
49 [ |
|
50 new nameChangeChecker("changeRichListItemChild: ", "listitem") |
|
51 ]; |
|
52 |
|
53 this.getID = function changeRichListItemChild_getID() |
|
54 { |
|
55 return "changeRichListItemChild"; |
|
56 } |
|
57 } |
|
58 |
|
59 function doTest() |
|
60 { |
|
61 var queue = new eventQueue(); |
|
62 queue.push(new changeRichListItemChild()); |
|
63 queue.invoke(); |
|
64 } |
|
65 |
|
66 SimpleTest.waitForExplicitFinish(); |
|
67 addA11yLoadEvent(doTest); |
|
68 ]]> |
|
69 </script> |
|
70 |
|
71 <vbox flex="1" style="overflow: auto;"> |
|
72 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
73 <a target="_blank" |
|
74 href="https://bugzilla.mozilla.org/show_bug.cgi?id=986054" |
|
75 title="Propagate name change events"> |
|
76 Mozilla Bug 986054 |
|
77 </a> |
|
78 |
|
79 <p id="display"></p> |
|
80 <div id="content" style="display: none"> |
|
81 </div> |
|
82 <pre id="test"> |
|
83 </pre> |
|
84 </body> |
|
85 |
|
86 <richlistbox> |
|
87 <richlistitem id="listitem"> |
|
88 <description id="childcontent" value="This will be changed."/> |
|
89 </richlistitem> |
|
90 </richlistbox> |
|
91 </vbox> |
|
92 </window> |