@@ -1,7 +1,7 @@
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
1# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3−# Unity Autopilot Test Suite
3+# Unity Indicators Autopilot Test Suite
4−# Copyright (C) 2012-2013 Canonical
4+# Copyright (C) 2013 Canonical
6# This program is free software: you can redistribute it and/or modify
6# This program is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
7# it under the terms of the GNU General Public License as published by
@@ -29,12 +29,12 @@ class DefaultIndicatorWidget(UnityEmulatorBase):
29 super(DefaultIndicatorWidget, self).__init__(*args, **kwargs)
29 super(DefaultIndicatorWidget, self).__init__(*args, **kwargs)
30 self.pointer = Pointer(Touch.create())
30 self.pointer = Pointer(Touch.create())
32− # TODO: submit to autopilot.introspection.types.Rectangle
32+ # TODO: submit to autopilot.introspection.types.Rectangle [alesage 2013-12-06]
33 def get_center(self):
33 def get_center(self):
34 """Returns (x, y) representing the center of a globalRect."""
34 """Returns (x, y) representing the center of a globalRect."""
36− self.globalRect[0]+int(self.globalRect[2]/2),
36+ self.globalRect.x+int(self.globalRect.width/2),
37− self.globalRect[1]+int(self.globalRect[3]/2)
37+ self.globalRect.y+int(self.globalRect.height/2)
40 def swipe_to_open_indicator(self, window):
40 def swipe_to_open_indicator(self, window):
@@ -46,7 +46,7 @@ class DefaultIndicatorWidget(UnityEmulatorBase):
46 start_x, start_y,
46 start_x, start_y,
47 end_x, end_y
47 end_x, end_y
49− # TODO: assert that the indicator page opened
49+ # TODO: assert that the indicator page opened [alesage 2013-12-06]
51 def swipe_to_close_indicator(self, window):
51 def swipe_to_close_indicator(self, window):
52 """Swipe to close the indicator, wait until it's closed."""
52 """Swipe to close the indicator, wait until it's closed."""
@@ -57,4 +57,4 @@ class DefaultIndicatorWidget(UnityEmulatorBase):
57 start_x, start_y,
57 start_x, start_y,
58 end_x, end_y
58 end_x, end_y
60− # TODO: assert that the indicator page closed
60+ # TODO: assert that the indicator page closed [alesage 2013-12-06]