=== modified file 'tests/autopilot/camera_app/tests/test_focus.py'
--- tests/autopilot/camera_app/tests/test_focus.py	2015-10-05 13:14:12 +0000
+++ tests/autopilot/camera_app/tests/test_focus.py	2016-02-25 12:41:57 +0000
@@ -28,6 +28,20 @@
     def tearDown(self):
         super(TestFocus, self).tearDown()
 
+    def verify_focus_ring_after_click_at(self, ring, x, y):
+        # The focus ring should be invisible in the beginning
+        self.assertThat(ring.opacity, Eventually(Equals(0.0)))
+
+        # Click in the designated spot
+        self.pointing_device.move(x, y)
+        self.pointing_device.click()
+
+        # The focus ring sould be visible now
+        self.assertThat(ring.opacity, Eventually(GreaterThan(0.5)))
+
+        # After some seconds the focus ring should fade out
+        self.assertThat(ring.opacity, Eventually(Equals(0.0)))
+
     """Test focusing in an area where we know the picture is"""
     @unittest.skipIf(model() == 'Galaxy Nexus', 'Unusable with Mir on maguro')
     def test_focus_valid_and_disappear(self):
@@ -36,21 +50,16 @@
         switch_cameras = self.main_window.get_swap_camera_button()
         exposure_button = self.main_window.get_exposure_button()
 
-        # The focus ring should be invisible in the beginning
-        self.assertThat(focus_ring.opacity, Eventually(Equals(0.0)))
-
-        self.pointing_device.move_to_object(feed)
-        self.pointing_device.click()
-        click_coords = list(self.pointing_device.position())
-
-        # The focus ring sould be visible and centered to the mouse click
-        # coords now
-        # focus_ring_center = self.get_center(focus_ring)
-        self.assertThat(focus_ring.opacity, Eventually(GreaterThan(0.5)))
-#        self.assertEquals(focus_ring_center, click_coords)
-
-        # After some seconds the focus ring should fade out
-        self.assertThat(focus_ring.opacity, Eventually(Equals(0.0)))
+        # Click in the center of the viewfinder area
+        mid_x, mid_y = self.get_center(feed)
+        self.verify_focus_ring_after_click_at(focus_ring, mid_x, mid_y)
+
+        # Then try on the side edges and top edge to verify they
+        # are focusable too
+        self.verify_focus_ring_after_click_at(focus_ring, 1, mid_y)
+        self.verify_focus_ring_after_click_at(focus_ring, feed.width - 1,
+                                              mid_y)
+        self.verify_focus_ring_after_click_at(focus_ring, mid_x, 1)
 
         # Switch cameras, wait for camera to settle, and try again
         self.pointing_device.move_to_object(switch_cameras)
@@ -58,19 +67,15 @@
         self.assertThat(exposure_button.enabled, Eventually(Equals(True)))
 
         # Click in the center of the viewfinder area
-        click_coords = [feed.globalRect[2] // 2 + feed.globalRect[0],
-                        feed.globalRect[3] // 2 + feed.globalRect[1]]
-        self.pointing_device.move(click_coords[0], click_coords[1])
-        self.pointing_device.click()
-
-        # The focus ring sould be visible and centered to the mouse
-        # click coords now
-        # focus_ring_center = self.get_center(focus_ring)
-        self.assertThat(focus_ring.opacity, Eventually(GreaterThan(0.5)))
-#        self.assertEquals(focus_ring_center, click_coords)
-
-        # After some seconds the focus ring should fade out
-        self.assertThat(focus_ring.opacity, Eventually(Equals(0.0)))
+        mid_feed = self.get_center(feed)
+        self.verify_focus_ring_after_click_at(focus_ring, mid_x, mid_y)
+
+        # Then try on the side edges and top edge to verify they
+        # are focusable too
+        self.verify_focus_ring_after_click_at(focus_ring, 1, mid_y)
+        self.verify_focus_ring_after_click_at(focus_ring, feed.width - 1,
+                                              mid_y)
+        self.verify_focus_ring_after_click_at(focus_ring, mid_x, 1)
 
     @unittest.skipIf(model() == 'Galaxy Nexus', 'Unusable with Mir on maguro')
     def test_focus_invalid(self):

