Bug 1321516 - Remove incorrect click/scroll test
The test assumes the click point is the centre of the element, whereas
WebDriver uses the _in-view_ centre point to perform a click.
This means that if parts of the element is rendered outside the viewport,
the click point is calculated from visible portion of the element that
is seen in the viewport.
MozReview-Commit-ID: 137rOoQNAnI
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_click_scrolling.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_click_scrolling.py
@@ -77,31 +77,16 @@ class TestClickScrolling(MarionetteTestC
def test_should_be_able_to_click_radio_button_scrolled_into_view(self):
test_html = self.marionette.absolute_url("scroll4.html")
self.marionette.navigate(test_html)
# If we dont throw we are good
self.marionette.find_element(By.ID, "radio").click()
- def test_should_scroll_elements_if_click_point_is_out_of_view_but_element_is_in_view(self):
- test_html = self.marionette.absolute_url("element_outside_viewport.html")
-
- for s in ["top", "bottom"]:
- self.marionette.navigate(test_html)
- scroll_y = self.marionette.execute_script("return window.scrollY;")
- self.marionette.find_element(By.ID, "{}-70".format(s)).click()
- self.assertNotEqual(scroll_y, self.marionette.execute_script("return window.scrollY;"))
-
- for s in ["left", "right"]:
- self.marionette.navigate(test_html)
- scroll_x = self.marionette.execute_script("return window.scrollX;")
- self.marionette.find_element(By.ID, "{}-70".format(s)).click()
- self.assertNotEqual(scroll_x, self.marionette.execute_script("return window.scrollX;"))
-
@skip_if_mobile("Bug 1293855 - Lists differ: [70, 70] != [70, 120]")
def test_should_not_scroll_elements_if_click_point_is_in_view(self):
test_html = self.marionette.absolute_url("element_outside_viewport.html")
for s in ["top", "right", "bottom", "left"]:
for p in ["50", "30"]:
self.marionette.navigate(test_html)
scroll = self.marionette.execute_script("return [window.scrollX, window.scrollY];")