Commit 3e1c8fed authored by krisr@chromium.org's avatar krisr@chromium.org

Fix testTimezoneIsEditable

BUG=chromium-os:27048
Review URL: https://chromiumcodereview.appspot.com/9549030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124500 0039d316-1c4b-4281-b951-d872f2087c98
parent 82e186c2
...@@ -45,20 +45,20 @@ class ChromeosTime(pyauto.PyUITest): ...@@ -45,20 +45,20 @@ class ChromeosTime(pyauto.PyUITest):
""" """
self.NavigateToURL('chrome://settings/system') self.NavigateToURL('chrome://settings/system')
ret = self.ExecuteJavascript(""" ret = self.ExecuteJavascript("""
var enabled = false; var disabled = true;
var timezone = document.getElementById('timezone-select'); var timezone = document.getElementById('timezone-select');
if (timezone) if (timezone)
enabled = banner.enabled; disabled = timezone.disabled;
domAutomationController.send(enabled.toString()); domAutomationController.send(disabled.toString());
""") """)
return ret == 'true' return ret == 'false'
def testTimezoneIsEditable(self): def testTimezoneIsEditable(self):
"""Test that the timezone is always editable.""" """Test that the timezone is always editable."""
# This test only makes sense if we are not running as the owner. # This test only makes sense if we are not running as the owner.
self.assertFalse(self.GetLoginInfo()['is_owner']) self.assertFalse(self.GetLoginInfo()['is_owner'])
enabled = _IsTimezoneEditable() editable = self._IsTimezoneEditable()
self.assertTrue(enabled, msg='Timezone is not editable when not owner.') self.assertTrue(editable, msg='Timezone is not editable when not owner.')
if __name__ == '__main__': if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment