Bug 1578604: accessible/tests/mochitest/actions/test_general.xul: Don't require the focus event on menulist to be unique. r=eeejay
authorJames Teh <jteh@mozilla.com>
Thu, 05 Sep 2019 20:38:32 +0000
changeset 491953 3bfc0e27d0389a069380540e49b0c4c5b6ecdc3e
parent 491952 641f1c8c0fd2e597b63da5f838916310aeab30eb
child 491954 df53ccb59e064ef84f06938e4250c73f81b1b8e1
push id94630
push userjteh@mozilla.com
push dateFri, 06 Sep 2019 00:05:05 +0000
treeherderautoland@3bfc0e27d038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerseeejay
bugs1578604
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1578604: accessible/tests/mochitest/actions/test_general.xul: Don't require the focus event on menulist to be unique. r=eeejay 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
         }*/
       ];