Bug 1578604: accessible/tests/mochitest/actions/test_general.xul: Don't require the focus event on menulist to be unique. r=eeejay, a=test-only
authorJames Teh <jteh@mozilla.com>
Thu, 05 Sep 2019 20:38:32 +0000
changeset 552025 4dfac5537b495e572ebf927dd274a1f09f7e3d63
parent 552024 7cb6568eb69b4a520b3b3b7778dc9a3ebfbb4cb2
child 552026 01fb50a0b682f28b30c4a1397e2d7ed4070d43c3
push id12028
push userryanvm@gmail.com
push dateMon, 23 Sep 2019 15:13:15 +0000
treeherdermozilla-beta@01fb50a0b682 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay, test-only
bugs1578604
milestone70.0
Bug 1578604: accessible/tests/mochitest/actions/test_general.xul: Don't require the focus event on menulist to be unique. r=eeejay, a=test-only focusChecker expects a unique focus event. However, there might still be pending focus events not caught by previous tests. Therefore, we specify our own checker so we can disable the uniqueness requirement. This is a little ugly, but it's rather difficult to work around this within this declarative framework without potentially breaking other tests. Differential Revision: https://phabricator.services.mozilla.com/D44615
accessible/tests/mochitest/actions/test_general.xul
--- a/accessible/tests/mochitest/actions/test_general.xul
+++ b/accessible/tests/mochitest/actions/test_general.xul
@@ -81,18 +81,21 @@
           actionName: "click",
           targetID: "toolbarbutton",
           events: XUL_EVENTS,
           allowBubbling: true
         },
         {
           ID: "menulist_label",
           actionName: "click",
-          targetID: "menulist",
-          events: FOCUS_EVENT
+          // focusChecker expects a unique focus event. However, there might
+          // still be pending focus events not caught by previous tests.
+          eventSeq: [
+            new invokerChecker(EVENT_FOCUS, getNode("menulist"))
+          ]
         }/*, // XXX: bug 490288
         {
           ID: "buttonmenu_item",
           actionName: "click",
           events: CLICK_EVENTS
         }*/
       ];