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

Unified Diff: chrome/test/pyautolib/chromeos/suid_actions.py

Issue 10830053: [chromeos] Simplify chromeos device policy tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: relogin hack Created 8 years, 5 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
Index: chrome/test/pyautolib/chromeos/suid_actions.py
diff --git a/chrome/test/pyautolib/chromeos/suid_actions.py b/chrome/test/pyautolib/chromeos/suid_actions.py
index 7ba07b8610ce7eb2fde182c9ca3cdd96d76335c8..f48f823c0f9207bc46d2b7375b30a7150e71cce6 100755
--- a/chrome/test/pyautolib/chromeos/suid_actions.py
+++ b/chrome/test/pyautolib/chromeos/suid_actions.py
@@ -24,12 +24,9 @@ sys.path.append('/usr/local') # to import autotest libs.
from autotest.cros import constants
from autotest.cros import cryptohome
-# TODO(bartfab): Remove when crosbug.com/20709 is fixed.
-sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
-from pyauto import AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE
-
TEMP_BACKCHANNEL_FILE = '/tmp/pyauto_network_backchannel_file'
+
class SuidAction(object):
"""Helper to perform some super-user actions on ChromeOS."""
@@ -89,38 +86,6 @@ class SuidAction(object):
"""Remove any existing cryptohome vaults."""
cryptohome.remove_all_vaults()
- def TryToDisableLocalStateAutoClearing(self):
- """Try to disable clearing of the local state on session manager startup.
-
- This will fail if rootfs verification is on.
- TODO(bartfab): Remove this method when crosbug.com/20709 is fixed.
- """
- os.system('mount -o remount,rw /')
- os.remove(AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
- os.system('mount -o remount,ro /')
- if os.path.exists(AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE):
- logging.debug('Failed to remove %s. Session manager will clear local '
- 'state on startup.' % AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
- else:
- logging.debug('Removed %s. Session manager will not clear local state on '
- 'startup.' % AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
-
- def TryToEnableLocalStateAutoClearing(self):
- """Try to enable clearing of the local state on session manager startup.
-
- This will fail if rootfs verification is on.
- TODO(bartfab): Remove this method when crosbug.com/20709 is fixed.
- """
- os.system('mount -o remount,rw /')
- open(AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE, 'w').close()
- os.system('mount -o remount,ro /')
- if os.path.exists(AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE):
- logging.debug('Created %s. Session manager will clear local state on '
- 'startup.' % AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
- else:
- logging.debug('Failed to create %s. Session manager will not clear local '
- 'state on startup.' % AUTO_CLEAR_LOCAL_STATE_MAGIC_FILE)
-
def _GetEthInterfaces(self):
"""Returns a list of the eth* interfaces detected by the device."""
# Assumes ethernet interfaces all have "eth" in the name.

Powered by Google App Engine
This is Rietveld 408576698