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 #30486 from mwargers/1172497
Browse files Browse the repository at this point in the history
Bug 1172497 - GaiaTest should not touch lockscreen when it is disabled
  • Loading branch information
mwargers committed Jun 10, 2015
2 parents e3eaf72 + ea256e4 commit e6106a9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/python/gaia-ui-tests/gaiatest/gaia_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,11 @@ def is_locked(self):
return self.marionette.execute_script("return window.wrappedJSObject.Service.query('locked')")

def lock(self):
self.marionette.switch_to_frame()
GaiaData(self.marionette).set_setting('lockscreen.enabled', True)
# Make sure the screen isn't turned off in lockscreen mode
self.marionette.execute_script(
'window.wrappedJSObject.ScreenManager.LOCKING_TIMEOUT = 9999;')
self.turn_screen_off()
self.turn_screen_on()
assert self.is_locked, 'The screen is not locked'
Expand Down Expand Up @@ -861,11 +865,6 @@ def setUp(self):
# make sure we restart to avoid leaving us in a bad state
self.device.start_b2g()

# Make sure the screen isn't turned off in lockscreen mode
self.marionette.switch_to_frame()
self.marionette.execute_script(
'window.wrappedJSObject.ScreenManager.LOCKING_TIMEOUT = 9999;')

# We need to set the default timeouts because we may have a new session
if self.marionette.timeout is None:
# if no timeout is passed in, we detect the hardware type and set reasonable defaults
Expand Down

0 comments on commit e6106a9

Please sign in to comment.