Bug 1396880 - Skip not relevant checks in test_accessibility for webdriver click. r=ato, a=test-only
authorHenrik Skupin <mail@hskupin.info>
Wed, 18 Oct 2017 14:22:19 +0200
changeset 435006 5ddf0b9c8ff294b1a530724379095c822f8c7b89
parent 435005 27a4dff9d4d58d784beb04c9084888d901806531
child 435007 02b7917df086f58533fdc5fd3573e01c1ab66071
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato, test-only
bugs1396880
milestone57.0
Bug 1396880 - Skip not relevant checks in test_accessibility for webdriver click. r=ato, a=test-only The test currently performs checks which will no longer raise the expected accessibility exceptions if the webdriver conforming click is enabled. In such a condition those specific situations are already covered in test_click.py. As long as the legacy click has not been fully removed keep running the checks but only if the webdriver click is not in use. MozReview-Commit-ID: 1DbKfJYADp
testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_accessibility.py
@@ -182,29 +182,33 @@ class TestAccessibility(MarionetteTestCa
                                                                 element.is_enabled))
 
         # Buttons are enabled but disabled/not-explorable via
         # the accessibility API and thus are not clickable via the
         # accessibility API.
         self.run_element_test(self.aria_disabled_elementIDs,
                               lambda element: self.assertRaises(ElementNotAccessibleException,
                                                                 element.click))
-        self.run_element_test(self.pointer_events_none_elementIDs,
-                              lambda element: self.assertRaises(ElementNotAccessibleException,
-                                                                element.click))
+        # To be removed with bug 1405967
+        if not self.marionette.session_capabilities["moz:webdriverClick"]:
+            self.run_element_test(self.pointer_events_none_elementIDs,
+                                  lambda element: self.assertRaises(ElementNotAccessibleException,
+                                                                    element.click))
 
         self.setup_accessibility(False, False)
         self.run_element_test(self.aria_disabled_elementIDs,
                               lambda element: element.is_enabled())
         self.run_element_test(self.pointer_events_none_elementIDs,
                               lambda element: element.is_enabled())
         self.run_element_test(self.aria_disabled_elementIDs,
                               lambda element: element.click())
-        self.run_element_test(self.pointer_events_none_elementIDs,
-                              lambda element: element.click())
+        # To be removed with bug 1405967
+        if not self.marionette.session_capabilities["moz:webdriverClick"]:
+            self.run_element_test(self.pointer_events_none_elementIDs,
+                                  lambda element: element.click())
 
     def test_element_is_enabled_to_accessibility(self):
         self.setup_accessibility()
         # No exception should be raised
         self.run_element_test(self.disabled_elementIDs, lambda element: element.is_enabled())
 
     def test_send_keys_raises_no_exception(self):
         self.setup_accessibility()