|
1 <!DOCTYPE html> |
|
2 <html> |
|
3 |
|
4 <head> |
|
5 <title>Test HTML li and listitem bullet accessible insertion into editable document</title> |
|
6 <link rel="stylesheet" type="text/css" |
|
7 href="chrome://mochikit/content/tests/SimpleTest/test.css" /> |
|
8 |
|
9 <script type="application/javascript" |
|
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
|
11 |
|
12 <script type="application/javascript" |
|
13 src="../common.js"></script> |
|
14 <script type="application/javascript" |
|
15 src="../role.js"></script> |
|
16 <script type="application/javascript" |
|
17 src="../events.js"></script> |
|
18 |
|
19 <script type="application/javascript"> |
|
20 |
|
21 //////////////////////////////////////////////////////////////////////////// |
|
22 // Invokers |
|
23 |
|
24 function addLi(aID) |
|
25 { |
|
26 this.listNode = getNode(aID); |
|
27 this.liNode = document.createElement("li"); |
|
28 this.liNode.textContent = "item"; |
|
29 |
|
30 this.eventSeq = [ |
|
31 new invokerChecker(EVENT_SHOW, getAccessible, this.liNode), |
|
32 new invokerChecker(EVENT_REORDER, this.listNode) |
|
33 ]; |
|
34 |
|
35 this.invoke = function addLi_invoke() |
|
36 { |
|
37 this.listNode.appendChild(this.liNode); |
|
38 } |
|
39 |
|
40 this.finalCheck = function addLi_finalCheck() |
|
41 { |
|
42 var tree = { |
|
43 role: ROLE_LIST, |
|
44 children: [ |
|
45 { |
|
46 role: ROLE_LISTITEM, |
|
47 children: [ |
|
48 { |
|
49 role: ROLE_STATICTEXT, |
|
50 name: "1. ", |
|
51 children: [] |
|
52 }, |
|
53 { |
|
54 role: ROLE_TEXT_LEAF, |
|
55 children: [] |
|
56 } |
|
57 ] |
|
58 } |
|
59 ] |
|
60 }; |
|
61 testAccessibleTree(aID, tree); |
|
62 } |
|
63 |
|
64 this.getID = function addLi_getID() |
|
65 { |
|
66 return "add li"; |
|
67 } |
|
68 }; |
|
69 |
|
70 //////////////////////////////////////////////////////////////////////////// |
|
71 // Test |
|
72 |
|
73 //gA11yEventDumpID = "eventdump"; // debug stuff |
|
74 |
|
75 var gQueue = null; |
|
76 |
|
77 function doTest() |
|
78 { |
|
79 gQueue = new eventQueue(); |
|
80 |
|
81 gQueue.push(new addLi("list")); |
|
82 |
|
83 gQueue.invoke(); // SimpleTest.finish() will be called in the end |
|
84 } |
|
85 |
|
86 SimpleTest.waitForExplicitFinish(); |
|
87 addA11yLoadEvent(doTest); |
|
88 </script> |
|
89 </head> |
|
90 <body contentEditable="true"> |
|
91 |
|
92 <a target="_blank" |
|
93 title="Wrong list bullet text of accessible for the first numbered HTML:li in CKEditor" |
|
94 href="https://bugzilla.mozilla.org/show_bug.cgi?id=557795">Mozilla Bug 557795</a> |
|
95 |
|
96 <p id="display"></p> |
|
97 <div id="content" style="display: none"></div> |
|
98 <pre id="test"> |
|
99 </pre> |
|
100 |
|
101 <ol id="list"> |
|
102 </ol> |
|
103 |
|
104 <div id="eventdump"></div> |
|
105 </body> |
|
106 </html> |