diff options
author | Moonchild <mcwerewolf@gmail.com> | 2018-04-23 12:17:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-23 12:17:34 +0200 |
commit | bccb9c1708f007ada1ea8c4879db88a587f0a450 (patch) | |
tree | 835dacc8cb3df7b05d4b62f4c551d8ad9f791371 /testing/marionette/harness/marionette_harness/tests/unit | |
parent | 1ea8529cfb0a246d09daf1ec742d063c08cf1899 (diff) | |
parent | d9d3b687b7c892b400e781dd5c57897efd7173aa (diff) | |
download | UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.gz UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.lz UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.xz UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.zip |
Merge pull request #238 from janekptacijarabaci/js_dom_pointer_events_2
moebius#195: DOM - PointerEvents - improvements (implement pointerup and pointerdown)
Diffstat (limited to 'testing/marionette/harness/marionette_harness/tests/unit')
-rw-r--r-- | testing/marionette/harness/marionette_harness/tests/unit/test_click.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/marionette/harness/marionette_harness/tests/unit/test_click.py b/testing/marionette/harness/marionette_harness/tests/unit/test_click.py index d03062e85..06019834a 100644 --- a/testing/marionette/harness/marionette_harness/tests/unit/test_click.py +++ b/testing/marionette/harness/marionette_harness/tests/unit/test_click.py @@ -252,3 +252,20 @@ class TestClick(TestLegacyClick): with self.assertRaises(errors.ElementClickInterceptedException): obscured.click() self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None)) + + def test_pointer_events_none(self): + self.marionette.navigate(inline(""" + <button style="pointer-events: none">click me</button> + <script> + window.clicked = false; + let button = document.querySelector("button"); + button.addEventListener("click", () => window.clicked = true); + </script> + """)) + button = self.marionette.find_element(By.TAG_NAME, "button") + self.assertEqual("none", button.value_of_css_property("pointer-events")) + + with self.assertRaisesRegexp(errors.ElementClickInterceptedException, + "does not have pointer events enabled"): + button.click() + self.assertFalse(self.marionette.execute_script("return window.clicked", sandbox=None)) |