on xenial help sign in
Prepare unity8 to the _uinput refactors in autopilot.
commit3e13f6ef6b613628c7de286ed59242c27e74df65 authorLeo Arias <leo.arias@canonical.com> dateWed 29 Jan 2014, 23:43 (13 years ago) parent2276f60
3 files changed+4−4
tests/autopilot/unity8/shell/__init__.py+2−2 tests/autopilot/unity8/shell/emulators/hud.py+1−1 tests/autopilot/unity8/shell/tests/test_hud.py+1−1
tests/autopilot/unity8/shell/__init__.py+2−2
@@ -55,8 +55,8 @@ class DragMixin(object):
5555 dx = 1.0 * (x2 - x1) / 100
5656 dy = 1.0 * (y2 - y1) / 100
5757 for i in range(0, 100):
58− self.touch._finger_move(int(cur_x), int(cur_y))
58+ self.touch._device.finger_move(int(cur_x), int(cur_y))
5959 sleep(0.002)
6060 cur_x += dx
6161 cur_y += dy
62− self.touch._finger_move(int(x2), int(y2))
62+ self.touch._device.finger_move(int(x2), int(y2))
tests/autopilot/unity8/shell/emulators/hud.py+1−1
@@ -54,7 +54,7 @@ class Hud(UnityEmulatorBase, DragMixin):
5454 except AssertionError:
5555 raise
5656 finally:
57− if self.touch._touch_finger is not None:
57+ if self.touch.pressed:
5858 self.touch.release()
5959
6060 def dismiss(self):
tests/autopilot/unity8/shell/tests/test_hud.py+1−1
@@ -187,5 +187,5 @@ class TestHud(UnityTestCase, DragMixin):
187187 # we don't.
188188 def _maybe_release_finger(self):
189189 """Only release the finger if it is in fact down."""
190− if self.touch._touch_finger is not None:
190+ if self.touch.pressed:
191191 self.touch.release()