Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #13621 from AndreiH/bug937079_v1.2
Browse files Browse the repository at this point in the history
Bug 937079 - test_gallery_view.py is not switching to landscape view
  • Loading branch information
teodosia committed Nov 12, 2013
2 parents 1731179 + d2e5fc4 commit 0060f00
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -2,6 +2,8 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

import time

from gaiatest import GaiaTestCase
from gaiatest.apps.gallery.app import Gallery

Expand Down Expand Up @@ -31,6 +33,9 @@ def test_gallery_view(self):

# Change the screen orientation to landscape mode and verify that the screen is in landscape mode
self.change_orientation('landscape-primary')

# Here we sleep only to give visual feedback when observing the test run
time.sleep(1)
self.assertTrue(image.is_photo_toolbar_displayed)
self.assertEqual('landscape-primary', self.screen_orientation)
self.assertEqual(self.screen_width, image.photo_toolbar_width)
Expand All @@ -40,6 +45,9 @@ def test_gallery_view(self):

# Change the screen orientation back to portrait-primary and verify the screen is in portrait mode
self.change_orientation('portrait-primary')

# Here we sleep only to give visual feedback when observing the test run
time.sleep(1)
self.assertTrue(image.is_photo_toolbar_displayed)
self.assertEqual('portrait-primary', self.screen_orientation)
self.assertEqual(self.screen_width, image.photo_toolbar_width)
Expand Down

0 comments on commit 0060f00

Please sign in to comment.