summaryrefslogtreecommitdiffstats
path: root/testing/marionette/harness/marionette_harness
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 11:54:06 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-23 11:54:06 +0200
commitd9d3b687b7c892b400e781dd5c57897efd7173aa (patch)
tree835dacc8cb3df7b05d4b62f4c551d8ad9f791371 /testing/marionette/harness/marionette_harness
parent1ea8529cfb0a246d09daf1ec742d063c08cf1899 (diff)
downloadUXP-d9d3b687b7c892b400e781dd5c57897efd7173aa.tar
UXP-d9d3b687b7c892b400e781dd5c57897efd7173aa.tar.gz
UXP-d9d3b687b7c892b400e781dd5c57897efd7173aa.tar.lz
UXP-d9d3b687b7c892b400e781dd5c57897efd7173aa.tar.xz
UXP-d9d3b687b7c892b400e781dd5c57897efd7173aa.zip
moebius#195: DOM - PointerEvent - improvements
https://github.com/MoonchildProductions/moebius/pull/195
Diffstat (limited to 'testing/marionette/harness/marionette_harness')
-rw-r--r--testing/marionette/harness/marionette_harness/tests/unit/test_click.py17
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))