diff --git a/accessible/tests/mochitest/attributes/test_obj_group.xul b/accessible/tests/mochitest/attributes/test_obj_group.xul index c6943ae37ab6..308c59bab22c 100644 --- a/accessible/tests/mochitest/attributes/test_obj_group.xul +++ b/accessible/tests/mochitest/attributes/test_obj_group.xul @@ -146,12 +146,12 @@ - - - - - - + + + + + + diff --git a/accessible/tests/mochitest/elm/test_listbox.xul b/accessible/tests/mochitest/elm/test_listbox.xul index e284b3e5cb60..1750391f483c 100644 --- a/accessible/tests/mochitest/elm/test_listbox.xul +++ b/accessible/tests/mochitest/elm/test_listbox.xul @@ -63,10 +63,10 @@ diff --git a/accessible/tests/mochitest/events/test_focus_listcontrols.xul b/accessible/tests/mochitest/events/test_focus_listcontrols.xul index 291d8f815eff..dc5106b5c9f2 100644 --- a/accessible/tests/mochitest/events/test_focus_listcontrols.xul +++ b/accessible/tests/mochitest/events/test_focus_listcontrols.xul @@ -30,16 +30,6 @@ // Test focus events. gQueue = new eventQueue(); - gQueue.push(new synthFocus("listbox", new focusChecker("lb_item1"))); - gQueue.push(new synthDownKey("lb_item1", new focusChecker("lb_item2"))); - gQueue.push(new synthTab("lb_item2", new focusChecker("mslb_item1"))); - gQueue.push(new synthDownKey("mslb_item1", new focusChecker("mslb_item2"), { shiftKey: true })); - gQueue.push(new synthTab("mslb_item2", new focusChecker("emptylistbox"))); - gQueue.push(new synthFocus("mcolumnlistbox", new focusChecker("mclb_item1"))); - gQueue.push(new synthDownKey("mclb_item1", new focusChecker("mclb_item2"))); - gQueue.push(new synthFocus("headerlistbox", new focusChecker("hlb_item1"))); - gQueue.push(new synthDownKey("hlb_item1", new focusChecker("hlb_item2"))); - gQueue.push(new synthFocus("richlistbox", new focusChecker("rlb_item1"))); gQueue.push(new synthDownKey("rlb_item1", new focusChecker("rlb_item2"))); gQueue.push(new synthFocus("multiselrichlistbox", new focusChecker("msrlb_item1"))); @@ -70,9 +60,8 @@ if (!MAC) { // no focus events for unfocused list controls when current item is // changed. - gQueue.push(new synthFocus("emptylistbox")); + gQueue.push(new synthFocus("emptyrichlistbox")); - gQueue.push(new changeCurrentItem("listbox", "lb_item1")); gQueue.push(new changeCurrentItem("richlistbox", "rlb_item1")); if (!MAC) { gQueue.push(new changeCurrentItem("menulist", WIN ? "ml_marmalade" : "ml_tangerine")); @@ -110,48 +99,6 @@ if (!MAC) { - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A XUL Description! diff --git a/accessible/tests/mochitest/events/test_selection.xul b/accessible/tests/mochitest/events/test_selection.xul index 17216f96c005..c9d7656e33d2 100644 --- a/accessible/tests/mochitest/events/test_selection.xul +++ b/accessible/tests/mochitest/events/test_selection.xul @@ -166,9 +166,12 @@ gQueue.push(new advanceTab("tabs", 1, "tab3")); ////////////////////////////////////////////////////////////////////////// - // listbox - gQueue.push(new synthClick("lb1_item1", - new invokerChecker(EVENT_SELECTION, "lb1_item1"))); + // single selection listbox, the first item is selected by default + + gQueue.push(new synthClick("lb1_item2", + new invokerChecker(EVENT_SELECTION, "lb1_item2"))); + gQueue.push(new synthUpKey("lb1_item2", + new invokerChecker(EVENT_SELECTION, "lb1_item1"))); gQueue.push(new synthDownKey("lb1_item1", new invokerChecker(EVENT_SELECTION, "lb1_item2"))); @@ -234,20 +237,20 @@ - - - - + + + + - - - - - - - - - + + + + + + + + + diff --git a/accessible/tests/mochitest/focus/test_takeFocus.xul b/accessible/tests/mochitest/focus/test_takeFocus.xul index 11f6e2a282b3..65af4af0e4e8 100644 --- a/accessible/tests/mochitest/focus/test_takeFocus.xul +++ b/accessible/tests/mochitest/focus/test_takeFocus.xul @@ -95,10 +95,10 @@ - - item1 - item2 - + + + + diff --git a/accessible/tests/mochitest/name/test_general.xul b/accessible/tests/mochitest/name/test_general.xul index 25c9c0e1628d..ff9d2dbe5ff3 100644 --- a/accessible/tests/mochitest/name/test_general.xul +++ b/accessible/tests/mochitest/name/test_general.xul @@ -276,10 +276,11 @@ label="labeled element"/> - - - + + + + @@ -359,11 +360,12 @@ - - - + + + + - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + diff --git a/accessible/tests/mochitest/states.js b/accessible/tests/mochitest/states.js index bf0a042ab5d6..dd9edb2dcbf5 100644 --- a/accessible/tests/mochitest/states.js +++ b/accessible/tests/mochitest/states.js @@ -155,7 +155,7 @@ function testStates(aAccOrElmOrID, aState, aExtraState, aAbsentState, "Mixed element cannot be state checked!"); // selected/selectable - if (state & STATE_SELECTED) { + if ((state & STATE_SELECTED) && !(aAbsentState & STATE_SELECTABLE)) { isState(state & STATE_SELECTABLE, STATE_SELECTABLE, false, "Selected element must be selectable!"); } diff --git a/accessible/tests/mochitest/states/test_controls.xul b/accessible/tests/mochitest/states/test_controls.xul index 1968f4ff55ea..4c971b573317 100644 --- a/accessible/tests/mochitest/states/test_controls.xul +++ b/accessible/tests/mochitest/states/test_controls.xul @@ -64,9 +64,9 @@ testStates("combobox", STATE_FOCUSABLE | STATE_HASPOPUP, 0, STATE_UNAVAILABLE); testStates("combobox-disabled", STATE_UNAVAILABLE | STATE_HASPOPUP, 0, STATE_FOCUSABLE); testStates("listbox", STATE_FOCUSABLE, 0, STATE_UNAVAILABLE); - testStates("listitem", STATE_FOCUSABLE | STATE_SELECTABLE, 0, STATE_UNAVAILABLE); + testStates("listitem", STATE_FOCUSABLE | STATE_SELECTABLE | STATE_SELECTED, 0, STATE_UNAVAILABLE); testStates("listbox-disabled", STATE_UNAVAILABLE, 0, STATE_FOCUSABLE | STATE_SELECTABLE); - testStates("listitem-disabledlistbox", STATE_UNAVAILABLE, 0, STATE_FOCUSABLE | STATE_SELECTABLE); + testStates("listitem-disabledlistbox", STATE_UNAVAILABLE | STATE_SELECTED, 0, STATE_FOCUSABLE | STATE_SELECTABLE); testStates("menubar", 0, 0, STATE_FOCUSABLE); testStates("menu", STATE_FOCUSABLE, 0, STATE_UNAVAILABLE); testStates("menu-disabled", STATE_UNAVAILABLE, 0, STATE_FOCUSABLE | STATE_SELECTABLE); @@ -135,13 +135,17 @@ - - - + + + + - - - + + + + diff --git a/accessible/tests/mochitest/table/a11y.ini b/accessible/tests/mochitest/table/a11y.ini index ba8e6ba98ab1..8d68137f0e36 100644 --- a/accessible/tests/mochitest/table/a11y.ini +++ b/accessible/tests/mochitest/table/a11y.ini @@ -5,22 +5,18 @@ support-files = [test_css_tables.html] [test_headers_ariagrid.html] [test_headers_ariatable.html] -[test_headers_listbox.xul] [test_headers_table.html] [test_headers_tree.xul] [test_indexes_ariagrid.html] -[test_indexes_listbox.xul] [test_indexes_table.html] [test_indexes_tree.xul] [test_layoutguess.html] [test_mtable.html] [test_sels_ariagrid.html] -[test_sels_listbox.xul] [test_sels_table.html] [test_sels_tree.xul] [test_struct_ariagrid.html] [test_struct_ariatreegrid.html] -[test_struct_listbox.xul] [test_struct_table.html] [test_struct_tree.xul] [test_table_1.html] diff --git a/accessible/tests/mochitest/table/test_headers_listbox.xul b/accessible/tests/mochitest/table/test_headers_listbox.xul deleted file mode 100644 index 343f112db760..000000000000 --- a/accessible/tests/mochitest/table/test_headers_listbox.xul +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - - - - - - - - Mozilla Bug 512424 - - -

- -
-    
- - - - - -
- -
- diff --git a/accessible/tests/mochitest/table/test_indexes_listbox.xul b/accessible/tests/mochitest/table/test_indexes_listbox.xul deleted file mode 100644 index 997d687f4ac6..000000000000 --- a/accessible/tests/mochitest/table/test_indexes_listbox.xul +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - Mozilla Bug 512424 - - -

- -
-    
- - - - - -
- -
- diff --git a/accessible/tests/mochitest/table/test_sels_listbox.xul b/accessible/tests/mochitest/table/test_sels_listbox.xul deleted file mode 100644 index d53d34b0e6c1..000000000000 --- a/accessible/tests/mochitest/table/test_sels_listbox.xul +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - - - - - - - - Mozilla Bug 418371 - - - Mozilla Bug 512424 - - -

- -
-    
- - - - - -
- -
- diff --git a/accessible/tests/mochitest/table/test_struct_listbox.xul b/accessible/tests/mochitest/table/test_struct_listbox.xul deleted file mode 100644 index 102269358da4..000000000000 --- a/accessible/tests/mochitest/table/test_struct_listbox.xul +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - Mozilla Bug 512424 - - -

- -
-    
- - - - - -
- -
- diff --git a/accessible/tests/mochitest/treeupdate/test_listbox.xul b/accessible/tests/mochitest/treeupdate/test_listbox.xul index 862b4dde85ae..6eccba14707e 100644 --- a/accessible/tests/mochitest/treeupdate/test_listbox.xul +++ b/accessible/tests/mochitest/treeupdate/test_listbox.xul @@ -25,8 +25,10 @@ { this.listboxNode = getNode(aListboxID); - this.listitemNode = document.createElement("listitem"); - this.listitemNode.setAttribute("label", "item1"); + this.listitemNode = document.createElement("richlistitem"); + var label = document.createElement("label"); + label.setAttribute("value", "item1"); + this.listitemNode.appendChild(label); this.eventSeq = [ new invokerChecker(EVENT_SHOW, this.listitemNode), @@ -168,11 +170,11 @@ - - - - - + + + + +