From fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:14:29 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- accessible/tests/mochitest/actions/test_media.html | 2 +- accessible/tests/mochitest/actions/test_tree.xhtml | 6 +- .../tests/mochitest/actions/test_treegrid.xhtml | 8 +- accessible/tests/mochitest/autocomplete.js | 8 +- accessible/tests/mochitest/common.js | 2 +- accessible/tests/mochitest/events.js | 7 +- accessible/tests/mochitest/events/a11y.toml | 2 - .../tests/mochitest/events/test_contextmenu.html | 2 +- .../events/test_focus_aria_activedescendant.html | 327 --------------------- .../tests/mochitest/events/test_focus_doc.html | 12 +- accessible/tests/mochitest/events/test_label.xhtml | 2 +- .../tests/mochitest/events/test_statechange.html | 2 +- accessible/tests/mochitest/name/markup.js | 2 +- accessible/tests/mochitest/name/test_tree.xhtml | 4 +- accessible/tests/mochitest/promisified-events.js | 4 +- .../mochitest/relations/test_tabbrowser.xhtml | 2 +- accessible/tests/mochitest/role.js | 1 + accessible/tests/mochitest/role/test_aria.html | 24 +- accessible/tests/mochitest/role/test_general.html | 2 +- .../mochitest/states/test_aria_widgetitems.html | 4 +- accessible/tests/mochitest/test_bug420863.html | 4 +- accessible/tests/mochitest/text.js | 24 +- .../mochitest/tree/test_aria_display_contents.html | 2 +- .../tests/mochitest/tree/test_aria_grid.html | 12 +- .../tests/mochitest/tree/test_aria_owns.html | 4 +- .../tests/mochitest/tree/test_tabbrowser.xhtml | 2 +- accessible/tests/mochitest/tree/test_tree.xhtml | 2 +- .../mochitest/treeupdate/test_contextmenu.xhtml | 4 +- .../mochitest/treeupdate/test_delayed_removal.html | 2 +- .../mochitest/treeupdate/test_shadow_slots.html | 10 +- .../tests/mochitest/treeupdate/test_shutdown.xhtml | 2 +- accessible/tests/mochitest/treeview.js | 16 +- 32 files changed, 105 insertions(+), 402 deletions(-) delete mode 100644 accessible/tests/mochitest/events/test_focus_aria_activedescendant.html (limited to 'accessible/tests/mochitest') diff --git a/accessible/tests/mochitest/actions/test_media.html b/accessible/tests/mochitest/actions/test_media.html index 5327901e56..99393b984b 100644 --- a/accessible/tests/mochitest/actions/test_media.html +++ b/accessible/tests/mochitest/actions/test_media.html @@ -32,7 +32,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573 this.getID = function focusChecker_getID() { return "focus handling"; }; - this.check = function focusChecker_check(aEvent) { + this.check = function focusChecker_check() { testStates(this.target, STATE_FOCUSED); }; } diff --git a/accessible/tests/mochitest/actions/test_tree.xhtml b/accessible/tests/mochitest/actions/test_tree.xhtml index 17710cbdce..3279ac74ee 100644 --- a/accessible/tests/mochitest/actions/test_tree.xhtml +++ b/accessible/tests/mochitest/actions/test_tree.xhtml @@ -31,7 +31,7 @@ { this.__proto__ = new focusChecker(aAcc); - this.check = function focusChecker_check(aEvent) + this.check = function focusChecker_check() { var states = aStates ? aStates : 0; testStates(this.target, STATE_FOCUSED | STATE_SELECTED | states); @@ -71,7 +71,7 @@ actionIndex: 1, events: CLICK_EVENTS, targetID: treeBodyNode, - checkOnClickEvent: function check(aEvent) + checkOnClickEvent: function check() { testStates(this.ID, STATE_EXPANDED); } @@ -82,7 +82,7 @@ actionIndex: 1, events: CLICK_EVENTS, targetID: treeBodyNode, - checkOnClickEvent: function check(aEvent) + checkOnClickEvent: function check() { testStates(this.ID, STATE_COLLAPSED); } diff --git a/accessible/tests/mochitest/actions/test_treegrid.xhtml b/accessible/tests/mochitest/actions/test_treegrid.xhtml index 1c6e1bb8aa..985018418b 100644 --- a/accessible/tests/mochitest/actions/test_treegrid.xhtml +++ b/accessible/tests/mochitest/actions/test_treegrid.xhtml @@ -37,7 +37,7 @@ { return "focus handling"; } - this.check = function focusChecker_check(aEvent) + this.check = function focusChecker_check() { var states = aStates ? aStates : 0; testStates(this.target, STATE_FOCUSED | STATE_SELECTED | states); @@ -52,7 +52,7 @@ { return "state change handling"; } - this.check = function stateChangeChecker_check(aEvent) + this.check = function stateChangeChecker_check() { if (aIsEnabled) testStates(this.target, STATE_CHECKED); @@ -95,7 +95,7 @@ actionIndex: 1, events: CLICK_EVENTS, targetID: treeBodyNode, - check: function check(aEvent) + check: function check() { testStates(this.ID, STATE_EXPANDED); } @@ -106,7 +106,7 @@ actionIndex: 1, events: CLICK_EVENTS, targetID: treeBodyNode, - check: function check(aEvent) + check: function check() { testStates(this.ID, STATE_COLLAPSED); } diff --git a/accessible/tests/mochitest/autocomplete.js b/accessible/tests/mochitest/autocomplete.js index bd5458c51d..baf9529473 100644 --- a/accessible/tests/mochitest/autocomplete.js +++ b/accessible/tests/mochitest/autocomplete.js @@ -171,11 +171,11 @@ AutoCompleteResult.prototype = { return this.comments[aIndex]; }, - getStyleAt(aIndex) { + getStyleAt() { return null; }, - getImageAt(aIndex) { + getImageAt() { return ""; }, @@ -183,11 +183,11 @@ AutoCompleteResult.prototype = { return this.getValueAt(aIndex); }, - isRemovableAt(aRowIndex) { + isRemovableAt() { return true; }, - removeValueAt(aRowIndex) {}, + removeValueAt() {}, // nsISupports implementation QueryInterface: ChromeUtils.generateQI(["nsIAutoCompleteResult"]), diff --git a/accessible/tests/mochitest/common.js b/accessible/tests/mochitest/common.js index f0ee117452..7f40c33bff 100644 --- a/accessible/tests/mochitest/common.js +++ b/accessible/tests/mochitest/common.js @@ -976,7 +976,7 @@ function prettyName(aIdentifier) { * @param aString the string to shorten. * @returns the shortened string. */ -function shortenString(aString, aMaxLength) { +function shortenString(aString) { if (aString.length <= MAX_TRIM_LENGTH) { return aString; } diff --git a/accessible/tests/mochitest/events.js b/accessible/tests/mochitest/events.js index a6c216e01d..d4e3221f95 100644 --- a/accessible/tests/mochitest/events.js +++ b/accessible/tests/mochitest/events.js @@ -928,10 +928,7 @@ function eventQueue(aEventType) { return invoker.getID(); }; - this.setInvokerStatus = function eventQueue_setInvokerStatus( - aStatus, - aLogMsg - ) { + this.setInvokerStatus = function eventQueue_setInvokerStatus(aStatus) { this.mNextInvokerStatus = aStatus; // Uncomment it to debug invoker processing logic. @@ -2348,7 +2345,7 @@ var gA11yEventApplicantsCount = 0; var gA11yEventObserver = { // eslint-disable-next-line complexity - observe: function observe(aSubject, aTopic, aData) { + observe: function observe(aSubject, aTopic) { if (aTopic != "accessible-event") { return; } diff --git a/accessible/tests/mochitest/events/a11y.toml b/accessible/tests/mochitest/events/a11y.toml index 501b59f7b7..81f9fab3d9 100644 --- a/accessible/tests/mochitest/events/a11y.toml +++ b/accessible/tests/mochitest/events/a11y.toml @@ -40,8 +40,6 @@ support-files = [ ["test_flush.html"] -["test_focus_aria_activedescendant.html"] - ["test_focus_autocomplete.html"] ["test_focus_autocomplete.xhtml"] diff --git a/accessible/tests/mochitest/events/test_contextmenu.html b/accessible/tests/mochitest/events/test_contextmenu.html index 6200efc00d..3047b4d46c 100644 --- a/accessible/tests/mochitest/events/test_contextmenu.html +++ b/accessible/tests/mochitest/events/test_contextmenu.html @@ -52,7 +52,7 @@ }; } - function closeContextMenu(aID) { + function closeContextMenu() { this.eventSeq = [ new invokerChecker(EVENT_MENUPOPUP_END, getAccessible(getContextMenuNode())), diff --git a/accessible/tests/mochitest/events/test_focus_aria_activedescendant.html b/accessible/tests/mochitest/events/test_focus_aria_activedescendant.html deleted file mode 100644 index 661284619a..0000000000 --- a/accessible/tests/mochitest/events/test_focus_aria_activedescendant.html +++ /dev/null @@ -1,327 +0,0 @@ - - - - - aria-activedescendant focus tests - - - - - - - - - - - - - - - Mozilla Bug 429547 - - - Mozilla Bug 761102 - -

- -
-  
- -
-
item1
-
item2
-
roaming
-
roaming2
-
-
item3
- -
- -
    -
  • option1
  • -
  • option2
  • -
-
- - - -
-
option
-
- -
- - -
-
- - - diff --git a/accessible/tests/mochitest/events/test_focus_doc.html b/accessible/tests/mochitest/events/test_focus_doc.html index a35fc06ed0..bfb43895bd 100644 --- a/accessible/tests/mochitest/events/test_focus_doc.html +++ b/accessible/tests/mochitest/events/test_focus_doc.html @@ -47,7 +47,17 @@ // focus on not editable document gQueue.push(new synthFocus(frame2InputAcc)); - gQueue.push(new synthShiftTab(frame2DocAcc, new focusChecker(frame2DocAcc))); + var canTabMoveFocusToRootElement = + !SpecialPowers.getBoolPref("dom.disable_tab_focus_to_root_element"); + if (canTabMoveFocusToRootElement) { + // Moves the focus to the root element + gQueue.push(new synthShiftTab(frame2DocAcc, new focusChecker(frame2DocAcc))); + } else { + // Skips the root element, so the focus got moved to buttonAcc2. + var buttonAcc2 = getAccessible("b2"); + gQueue.push(new synthShiftTab(buttonAcc2, new focusChecker(buttonAcc2))); + } + gQueue.invoke(); // Will call SimpleTest.finish(); } diff --git a/accessible/tests/mochitest/events/test_label.xhtml b/accessible/tests/mochitest/events/test_label.xhtml index 5780629dc6..2f207eba65 100644 --- a/accessible/tests/mochitest/events/test_label.xhtml +++ b/accessible/tests/mochitest/events/test_label.xhtml @@ -93,7 +93,7 @@ /** * Change @crop attribute. */ - function setCrop(aID, aCropValue, aRemovedText, aInsertedText) + function setCrop(aID, aCropValue) { this.labelNode = getNode(aID); this.width = this.labelNode.getBoundingClientRect().width; diff --git a/accessible/tests/mochitest/events/test_statechange.html b/accessible/tests/mochitest/events/test_statechange.html index 0642851408..0ecf54b0d1 100644 --- a/accessible/tests/mochitest/events/test_statechange.html +++ b/accessible/tests/mochitest/events/test_statechange.html @@ -28,7 +28,7 @@ await p; } - async function makeEditableDoc(aDocNode, aIsEnabled) { + async function makeEditableDoc(aDocNode) { let p = waitForStateChange(aDocNode, EXT_STATE_EDITABLE, true, true); aDocNode.designMode = "on"; await p; diff --git a/accessible/tests/mochitest/name/markup.js b/accessible/tests/mochitest/name/markup.js index a267bd4f7b..4ad478482b 100644 --- a/accessible/tests/mochitest/name/markup.js +++ b/accessible/tests/mochitest/name/markup.js @@ -335,7 +335,7 @@ function testNameForElmRule(aElm, aRule) { parentNode.removeChild(labelElm); } -function testNameForSubtreeRule(aElm, aRule) { +function testNameForSubtreeRule(aElm) { var msg = "From subtree test (" + gTestIterator.testID + ")."; testName(aElm, aElm.getAttribute("textequiv"), msg); testAbsentAttrs(aElm, { "explicit-name": "true" }); diff --git a/accessible/tests/mochitest/name/test_tree.xhtml b/accessible/tests/mochitest/name/test_tree.xhtml index 3564481d00..282e4ea118 100644 --- a/accessible/tests/mochitest/name/test_tree.xhtml +++ b/accessible/tests/mochitest/name/test_tree.xhtml @@ -31,7 +31,7 @@ this.DOMNode.view = new nsTreeTreeView(); } - this.check = function treeTester_check(aEvent) + this.check = function treeTester_check() { var tree = { role: ROLE_OUTLINE, @@ -89,7 +89,7 @@ this.DOMNode.view = new nsTableTreeView(2); } - this.check = function tableTester_check(aEvent) + this.check = function tableTester_check() { var tree = { role: aIsTable ? ROLE_TABLE : ROLE_TREE_TABLE, diff --git a/accessible/tests/mochitest/promisified-events.js b/accessible/tests/mochitest/promisified-events.js index c58466dcf1..223be16147 100644 --- a/accessible/tests/mochitest/promisified-events.js +++ b/accessible/tests/mochitest/promisified-events.js @@ -141,7 +141,7 @@ function matchEvent(event, matchCriteria) { function waitForEvent(eventType, matchCriteria, message) { return new Promise(resolve => { let eventObserver = { - observe(subject, topic, data) { + observe(subject, topic) { if (topic !== "accessible-event") { return; } @@ -185,7 +185,7 @@ class UnexpectedEvents { } } - observe(subject, topic, data) { + observe(subject, topic) { if (topic !== "accessible-event") { return; } diff --git a/accessible/tests/mochitest/relations/test_tabbrowser.xhtml b/accessible/tests/mochitest/relations/test_tabbrowser.xhtml index 3356bc6140..4820419c1e 100644 --- a/accessible/tests/mochitest/relations/test_tabbrowser.xhtml +++ b/accessible/tests/mochitest/relations/test_tabbrowser.xhtml @@ -43,7 +43,7 @@ browserDocument().documentElement.getBoundingClientRect(); } - this.finalCheck = function testTabRelations_finalCheck(aEvent) + this.finalCheck = function testTabRelations_finalCheck() { //////////////////////////////////////////////////////////////////////// // 'labelled by'/'label for' relations for xul:tab and xul:tabpanel diff --git a/accessible/tests/mochitest/role.js b/accessible/tests/mochitest/role.js index 07b820c2ac..66cb6de4d2 100644 --- a/accessible/tests/mochitest/role.js +++ b/accessible/tests/mochitest/role.js @@ -40,6 +40,7 @@ const ROLE_FLAT_EQUATION = nsIAccessibleRole.ROLE_FLAT_EQUATION; const ROLE_FORM = nsIAccessibleRole.ROLE_FORM; const ROLE_FORM_LANDMARK = nsIAccessibleRole.ROLE_FORM_LANDMARK; const ROLE_GRAPHIC = nsIAccessibleRole.ROLE_GRAPHIC; +const ROLE_GRID = nsIAccessibleRole.ROLE_GRID; const ROLE_GRID_CELL = nsIAccessibleRole.ROLE_GRID_CELL; const ROLE_GROUPING = nsIAccessibleRole.ROLE_GROUPING; const ROLE_HEADING = nsIAccessibleRole.ROLE_HEADING; diff --git a/accessible/tests/mochitest/role/test_aria.html b/accessible/tests/mochitest/role/test_aria.html index bd7ffd27fb..0e7873c485 100644 --- a/accessible/tests/mochitest/role/test_aria.html +++ b/accessible/tests/mochitest/role/test_aria.html @@ -56,16 +56,16 @@ testRole("aria_directory_mixed", ROLE_LIST); testRole("aria_document", ROLE_NON_NATIVE_DOCUMENT); testRole("aria_document_mixed", ROLE_NON_NATIVE_DOCUMENT); - testRole("aria_form", ROLE_FORM); - testRole("aria_form_mixed", ROLE_FORM); + testRole("aria_form", ROLE_TEXT); + testRole("aria_form_mixed", ROLE_TEXT); testRole("aria_form_with_label", ROLE_FORM); testRole("aria_form_with_label_mixed", ROLE_FORM); testRole("aria_feed", ROLE_GROUPING); testRole("aria_feed_mixed", ROLE_GROUPING); testRole("aria_figure", ROLE_FIGURE); testRole("aria_figure_mixed", ROLE_FIGURE); - testRole("aria_grid", ROLE_TABLE); - testRole("aria_grid_mixed", ROLE_TABLE); + testRole("aria_grid", ROLE_GRID); + testRole("aria_grid_mixed", ROLE_GRID); testRole("aria_gridcell", ROLE_GRID_CELL); testRole("aria_gridcell_mixed", ROLE_GRID_CELL); testRole("aria_group", ROLE_GROUPING); @@ -184,8 +184,10 @@ testRole("articlemain", ROLE_LANDMARK); testRole("articlemain_mixed", ROLE_LANDMARK); - testRole("articleform", ROLE_FORM); - testRole("articleform_mixed", ROLE_FORM); + testRole("articleform", ROLE_ARTICLE); + testRole("articleform_mixed", ROLE_ARTICLE); + testRole("articleform_label", ROLE_FORM); + testRole("articleform_label_mixed", ROLE_FORM); // Test article exposed as article testRole("testArticle", ROLE_ARTICLE); @@ -204,8 +206,10 @@ // strong landmark testRole("application", ROLE_APPLICATION); testRole("application_mixed", ROLE_APPLICATION); - testRole("form", ROLE_FORM); - testRole("form_mixed", ROLE_FORM); + testRole("form", ROLE_SECTION); + testRole("form_mixed", ROLE_SECTION); + testRole("form_label", ROLE_FORM); + testRole("form_label_mixed", ROLE_FORM); testRole("application_table", ROLE_APPLICATION); testRole("application_table_mixed", ROLE_APPLICATION); @@ -535,6 +539,8 @@
a main area
a form area
a form area
+
a form area
+
a form area

This is a paragraph inside the article.

@@ -561,6 +567,8 @@
application
form
form
+
form
+
form
diff --git a/accessible/tests/mochitest/role/test_general.html b/accessible/tests/mochitest/role/test_general.html index 38dde3325a..c0afd39360 100644 --- a/accessible/tests/mochitest/role/test_general.html +++ b/accessible/tests/mochitest/role/test_general.html @@ -161,7 +161,7 @@ id="nav_overflow">overflow nav
overflow header
-
overflow footer
diff --git a/accessible/tests/mochitest/states/test_aria_widgetitems.html b/accessible/tests/mochitest/states/test_aria_widgetitems.html index c2d546ba01..d17f110c22 100644 --- a/accessible/tests/mochitest/states/test_aria_widgetitems.html +++ b/accessible/tests/mochitest/states/test_aria_widgetitems.html @@ -26,7 +26,7 @@ this.DOMNode.focus(); }; - this.check = function focusARIAItem_check(aEvent) { + this.check = function focusARIAItem_check() { testStates(this.DOMNode, aIsSelected ? STATE_SELECTED : 0, 0, aIsSelected ? 0 : STATE_SELECTED); }; @@ -47,7 +47,7 @@ this.widgetDOMNode.focus(); }; - this.check = function focusActiveDescendantItem_check(aEvent) { + this.check = function focusActiveDescendantItem_check() { testStates(this.DOMNode, aIsSelected ? STATE_SELECTED : 0, 0, aIsSelected ? 0 : STATE_SELECTED); }; diff --git a/accessible/tests/mochitest/test_bug420863.html b/accessible/tests/mochitest/test_bug420863.html index 4f3a608fe1..9d515ab3c6 100644 --- a/accessible/tests/mochitest/test_bug420863.html +++ b/accessible/tests/mochitest/test_bug420863.html @@ -40,7 +40,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863 // register 'click' event handler gClickHandler = { - handleEvent: function handleEvent(aEvent) { + handleEvent: function handleEvent() { }, }; td3Node.addEventListener("click", gClickHandler); @@ -58,7 +58,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=420863 actionName: "click", actionIndex: 0, events: CLICK_EVENTS, - checkOnClickEvent: function check(aEvent) { + checkOnClickEvent: function check() { // unregister click event handler this.ID.removeEventListener("click", gClickHandler); diff --git a/accessible/tests/mochitest/text.js b/accessible/tests/mochitest/text.js index 21392336a1..6fe2a00b83 100644 --- a/accessible/tests/mochitest/text.js +++ b/accessible/tests/mochitest/text.js @@ -197,9 +197,17 @@ function testTextAfterOffset( aBoundaryType, aText, aStartOffset, - aEndOffset + aEndOffset, + ...aArgs ) { - testTextSuperHelper("getTextAfterOffset", arguments); + testTextSuperHelper("getTextAfterOffset", [ + aOffset, + aBoundaryType, + aText, + aStartOffset, + aEndOffset, + ...aArgs, + ]); } /** @@ -261,9 +269,17 @@ function testTextBeforeOffset( aBoundaryType, aText, aStartOffset, - aEndOffset + aEndOffset, + ...aArgs ) { - testTextSuperHelper("getTextBeforeOffset", arguments); + testTextSuperHelper("getTextBeforeOffset", [ + aOffset, + aBoundaryType, + aText, + aStartOffset, + aEndOffset, + ...aArgs, + ]); } /** diff --git a/accessible/tests/mochitest/tree/test_aria_display_contents.html b/accessible/tests/mochitest/tree/test_aria_display_contents.html index 5c6f7f20fb..454e4e46e1 100644 --- a/accessible/tests/mochitest/tree/test_aria_display_contents.html +++ b/accessible/tests/mochitest/tree/test_aria_display_contents.html @@ -17,7 +17,7 @@ // Test ARIA grids that have display: contents; on different elements. // They should all have equivalent trees. var accTree = - { TABLE: [ + { GRID: [ { ROW: [ { role: ROLE_COLUMNHEADER, children: [ { TEXT_LEAF: [ ] }, ] diff --git a/accessible/tests/mochitest/tree/test_aria_grid.html b/accessible/tests/mochitest/tree/test_aria_grid.html index 80ff97095b..4dd30e4183 100644 --- a/accessible/tests/mochitest/tree/test_aria_grid.html +++ b/accessible/tests/mochitest/tree/test_aria_grid.html @@ -18,7 +18,7 @@ // grid having rowgroups var accTree = - { TABLE: [ + { GRID: [ { GROUPING: [ { ROW: [ { GRID_CELL: [ @@ -34,7 +34,7 @@ // strange grids (mix of ARIA and HTML tables) accTree = { - role: ROLE_TABLE, + role: ROLE_GRID, children: [ { // div@role="row" role: ROLE_ROW, @@ -67,7 +67,7 @@ testAccessibleTree("strange_grid1", accTree); accTree = { - role: ROLE_TABLE, + role: ROLE_GRID, children: [ { // tr@role="row" role: ROLE_ROW, @@ -95,7 +95,7 @@ testAccessibleTree("strange_grid2", accTree); accTree = { - role: ROLE_TABLE, + role: ROLE_GRID, children: [ { // div@role="row" role: ROLE_ROW, @@ -122,7 +122,7 @@ testAccessibleTree("strange_grid3", accTree); accTree = { - role: ROLE_TABLE, + role: ROLE_GRID, children: [ { // div@role="row" role: ROLE_ROW, @@ -192,7 +192,7 @@ // grids that could contain text container accessibles but shouldn't. accTree = - { TABLE: [ + { GRID: [ { ROW: [ { GRID_CELL: [ { TEXT_LEAF: [ ] }, diff --git a/accessible/tests/mochitest/tree/test_aria_owns.html b/accessible/tests/mochitest/tree/test_aria_owns.html index a01968521b..760cf7565b 100644 --- a/accessible/tests/mochitest/tree/test_aria_owns.html +++ b/accessible/tests/mochitest/tree/test_aria_owns.html @@ -96,7 +96,7 @@ testAccessibleTree("ariaowns_container", tree); tree = - { TABLE: [ + { GRID: [ { ROW: [ { GRID_CELL: [ { TEXT_LEAF: [] }, @@ -160,7 +160,7 @@
-
+
diff --git a/accessible/tests/mochitest/tree/test_tabbrowser.xhtml b/accessible/tests/mochitest/tree/test_tabbrowser.xhtml index 401ea1a2b1..3ccf83e4dc 100644 --- a/accessible/tests/mochitest/tree/test_tabbrowser.xhtml +++ b/accessible/tests/mochitest/tree/test_tabbrowser.xhtml @@ -42,7 +42,7 @@ browserDocument().documentElement.getBoundingClientRect(); } - this.finalCheck = function testTabHierarchy_finalCheck(aEvent) + this.finalCheck = function testTabHierarchy_finalCheck() { //////////////////// // Tab bar diff --git a/accessible/tests/mochitest/tree/test_tree.xhtml b/accessible/tests/mochitest/tree/test_tree.xhtml index e22b3faa9d..e70ef134e9 100644 --- a/accessible/tests/mochitest/tree/test_tree.xhtml +++ b/accessible/tests/mochitest/tree/test_tree.xhtml @@ -97,7 +97,7 @@ { this.DOMNode.view = aView; } - this.check = function check(aEvent) + this.check = function check() { testAccessibleTreeFor(this.DOMNode, aRole); } diff --git a/accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml b/accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml index f81d77332d..9edac19af6 100644 --- a/accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml +++ b/accessible/tests/mochitest/treeupdate/test_contextmenu.xhtml @@ -31,7 +31,7 @@ getNode(aID).openPopup(button, "after_start", 0, 0, true, false); } - this.finalCheck = function openMenu_finalCheck(aEvent) + this.finalCheck = function openMenu_finalCheck() { testAccessibleTree(aID, aTree); } @@ -70,7 +70,7 @@ synthesizeKey("KEY_Enter"); } - this.finalCheck = function openSubMenu_finalCheck(aEvent) + this.finalCheck = function openSubMenu_finalCheck() { testAccessibleTree(aMenuID, aTree); } diff --git a/accessible/tests/mochitest/treeupdate/test_delayed_removal.html b/accessible/tests/mochitest/treeupdate/test_delayed_removal.html index 3f421f0c5b..2ba1e31203 100644 --- a/accessible/tests/mochitest/treeupdate/test_delayed_removal.html +++ b/accessible/tests/mochitest/treeupdate/test_delayed_removal.html @@ -218,7 +218,7 @@ } // Check to see that a reframed body gets its children pruned correctly. - async function bodyReframe(argument) { + async function bodyReframe() { // Load sub-document in iframe. let event = waitForEvent(EVENT_REORDER, "iframe", "bodyReframe"); getNode("iframe").src = diff --git a/accessible/tests/mochitest/treeupdate/test_shadow_slots.html b/accessible/tests/mochitest/treeupdate/test_shadow_slots.html index 27baef0e4a..6680971401 100644 --- a/accessible/tests/mochitest/treeupdate/test_shadow_slots.html +++ b/accessible/tests/mochitest/treeupdate/test_shadow_slots.html @@ -55,7 +55,7 @@ async function changeSlotFlat() { await _dynamicShadowTest("changeSlotFlat", - (container, host) => { + (container) => { container.querySelector('.red').removeAttribute('slot'); container.querySelector('.green').setAttribute('slot', 'myslot'); }, { SECTION: [{ SECTION: [{ name: "green"} ] }] }); @@ -63,7 +63,7 @@ async function changeSlotOneDeep() { await _dynamicShadowTest("changeSlotOneDeep", - (container, host) => { + (container) => { container.querySelector('.red').removeAttribute('slot'); container.querySelector('.green').setAttribute('slot', 'myslot'); }, { SECTION: [{ SECTION: [{ SECTION: [{ name: "green"} ] }] }] }, ["shadowdiv"]); @@ -72,7 +72,7 @@ // Nested roots and slots async function changeSlotNested() { await _dynamicShadowTest("changeSlotNested", - (container, host) => { + (container) => { testAccessibleTree(getNode("changeSlotNested"), { SECTION: [{ SECTION: [{ SECTION: [{ name: "red"} ] }] }] }); container.querySelector('.red').removeAttribute('slot'); @@ -82,14 +82,14 @@ async function changeSlotSingleChild() { await _dynamicShadowTest("changeSlotSingleChild", - (container, host) => { + (container) => { container.querySelector('.red').setAttribute('slot', 'invalid'); }, { SECTION: [{ SECTION: [] }] }); } async function changeSlotNoShadow() { await _dynamicShadowTest("changeSlotNoShadow", - (container, host) => { + (container) => { // Make sure changing the slot attribute doesn't remove an element // even when it remains in the flat tree. container.querySelector('.red').setAttribute('slot', 'invalid'); diff --git a/accessible/tests/mochitest/treeupdate/test_shutdown.xhtml b/accessible/tests/mochitest/treeupdate/test_shutdown.xhtml index ad8aebf812..9be24cb6f4 100644 --- a/accessible/tests/mochitest/treeupdate/test_shutdown.xhtml +++ b/accessible/tests/mochitest/treeupdate/test_shutdown.xhtml @@ -57,7 +57,7 @@ getNode(aID).remove(); }; - this.check = function check(aEvent) + this.check = function check() { testIsDefunct(this.tree, aID); testIsDefunct(this.lastItem, "last item of " + aID); diff --git a/accessible/tests/mochitest/treeview.js b/accessible/tests/mochitest/treeview.js index 5dc3b595d8..6b50e5fecc 100644 --- a/accessible/tests/mochitest/treeview.js +++ b/accessible/tests/mochitest/treeview.js @@ -91,11 +91,11 @@ nsTreeView.prototype = { return data.text + aCol.id; }, - getCellValue: function getCellValue(aRow, aCol) { + getCellValue: function getCellValue(aRow) { var data = this.getDataForIndex(aRow); return data.value; }, - getRowProperties: function getRowProperties(aIndex) { + getRowProperties: function getRowProperties() { return ""; }, getCellProperties: function getCellProperties(aIndex, aCol) { @@ -106,19 +106,19 @@ nsTreeView.prototype = { var data = this.getDataForIndex(aIndex); return this.mCyclerStates[data.cyclerState]; }, - getColumnProperties: function getColumnProperties(aCol) { + getColumnProperties: function getColumnProperties() { return ""; }, getParentIndex: function getParentIndex(aRowIndex) { var info = this.getInfoByIndex(aRowIndex); return info.parentIndex; }, - hasNextSibling: function hasNextSibling(aRowIndex, aAfterIndex) {}, + hasNextSibling: function hasNextSibling() {}, getLevel: function getLevel(aIndex) { var info = this.getInfoByIndex(aIndex); return info.level; }, - getImageSrc: function getImageSrc(aRow, aCol) {}, + getImageSrc: function getImageSrc() {}, isContainer: function isContainer(aIndex) { var data = this.getDataForIndex(aIndex); return data.open != undefined; @@ -131,7 +131,7 @@ nsTreeView.prototype = { var data = this.getDataForIndex(aIndex); return data.open == undefined; }, - isSeparator: function isSeparator(aIndex) {}, + isSeparator: function isSeparator() {}, isSorted: function isSorted() {}, toggleOpenState: function toggleOpenState(aIndex) { var data = this.getDataForIndex(aIndex); @@ -146,14 +146,14 @@ nsTreeView.prototype = { } }, selectionChanged: function selectionChanged() {}, - cycleHeader: function cycleHeader(aCol) {}, + cycleHeader: function cycleHeader() {}, cycleCell: function cycleCell(aRow, aCol) { var data = this.getDataForIndex(aRow); data.cyclerState = (data.cyclerState + 1) % 3; this.mTree.invalidateCell(aRow, aCol); }, - isEditable: function isEditable(aRow, aCol) { + isEditable: function isEditable() { return true; }, setCellText: function setCellText(aRow, aCol, aValue) { -- cgit v1.2.3