Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4810)

Unified Diff: chrome/test/pyautolib/pyauto.py

Issue 9960074: Add a test for the "ephemeral_users_enabled" device policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Meh. Copy & paste error in license header. Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/pyautolib/chromeos/suid_actions.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/pyautolib/pyauto.py
diff --git a/chrome/test/pyautolib/pyauto.py b/chrome/test/pyautolib/pyauto.py
index adc688a39ce2cde4ece9e3a5026ed489cff8f92e..31c2db6db5382dba5dac16522e27494884077825 100755
--- a/chrome/test/pyautolib/pyauto.py
+++ b/chrome/test/pyautolib/pyauto.py
@@ -96,6 +96,9 @@ _REMOTE_PROXY = None
_OPTIONS = None
_BROWSER_PID = None
+# TODO(bartfab): Remove when crosbug.com/20709 is fixed.
+AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE = '/root/.forget_usernames'
+
class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
"""Base class for UI Test Cases in Python.
@@ -448,6 +451,30 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
PyUITest.RunSuperuserActionOnChromeOS('RemoveAllCryptohomeVaults')
@staticmethod
+ def TryToDisableLocalStateAutoClearingOnChromeOS():
+ """Disable clearing of the local state on session manager startup.
+
+ TODO(bartfab): Remove this method when crosbug.com/20709 is fixed.
+ """
+ PyUITest.RunSuperuserActionOnChromeOS('TryToDisableLocalStateAutoClearing')
+
+ @staticmethod
+ def TryToEnableLocalStateAutoClearingOnChromeOS():
+ """Enable clearing of the local state on session manager startup.
+
+ TODO(bartfab): Remove this method when crosbug.com/20709 is fixed.
+ """
+ PyUITest.RunSuperuserActionOnChromeOS('TryToEnableLocalStateAutoClearing')
+
+ @staticmethod
+ def IsLocalStateAutoClearingEnabledOnChromeOS():
+ """Check if the session manager is set to clear the local state on startup.
+
+ TODO(bartfab): Remove this method when crosbug.com/20709 is fixed.
+ """
+ return os.path.exists(AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
+
+ @staticmethod
def _IsInodeNew(path, old_inode):
"""Determine whether an inode has changed. POSIX only.
@@ -1292,7 +1319,7 @@ class PyUITest(pyautolib.PyUITestBase, unittest.TestCase):
an instance of prefs_info.PrefsInfo
"""
return prefs_info.PrefsInfo(
- self._SendJSONRequest(0,
+ self._SendJSONRequest(-1,
json.dumps({'command': 'GetLocalStatePrefsInfo'}),
self.action_max_timeout_ms()))
« no previous file with comments | « chrome/test/pyautolib/chromeos/suid_actions.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698