diff options
author | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 18:39:10 +0000 |
---|---|---|
committer | dtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-11 18:39:10 +0000 |
commit | 36103d1dc6fc3b8a964424293a3b6787ada0509a (patch) | |
tree | d59627c8b69dcc125f0207d38eb275afc1a78c2b /chrome/test/functional | |
parent | 0a4a1bb2afa3d3f8b9a9c981e420ff2048e68de7 (diff) | |
download | chromium_src-36103d1dc6fc3b8a964424293a3b6787ada0509a.zip chromium_src-36103d1dc6fc3b8a964424293a3b6787ada0509a.tar.gz chromium_src-36103d1dc6fc3b8a964424293a3b6787ada0509a.tar.bz2 |
ChromeOS updater testing automation hooks that can be called from Python using PyAuto.
GetUpdateInfo() returns information about the updater, including what track (channel) the updater is on and what state the updater is in.
UpdateCheck() will initiate a check for updates and attempt to install one if there is one. It is a blocking call.
SetReleaseTrack() will set the release track to either "beta-channel" or "dev-channel".
BUG=chromium-os:12524
TEST=testSetReleaseTrack and testGetUpdateInfo included in chromeos_basic.py. UpdateCheck() tested manually, since an AU server or devserver is needed to test it.
Review URL: http://codereview.chromium.org/6813006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81129 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/functional')
-rw-r--r-- | chrome/test/functional/PYAUTO_TESTS | 1 | ||||
-rw-r--r-- | chrome/test/functional/chromeos_update.py | 30 |
2 files changed, 31 insertions, 0 deletions
diff --git a/chrome/test/functional/PYAUTO_TESTS b/chrome/test/functional/PYAUTO_TESTS index 5fbfbfe..c88733b 100644 --- a/chrome/test/functional/PYAUTO_TESTS +++ b/chrome/test/functional/PYAUTO_TESTS @@ -176,6 +176,7 @@ 'chromeos': [ 'chromeos_basic', 'chromeos_power', + 'chromeos_update', 'chromeos_wifi', '-chromeos_basic.ChromeosBasic.testScreenLocker', diff --git a/chrome/test/functional/chromeos_update.py b/chrome/test/functional/chromeos_update.py new file mode 100644 index 0000000..f1d1147 --- /dev/null +++ b/chrome/test/functional/chromeos_update.py @@ -0,0 +1,30 @@ +#!/usr/bin/python +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import logging + +import pyauto_functional +import pyauto + + +class ChromeosUpdate(pyauto.PyUITest): + """Tests for ChromeOS updater and channel changer.""" + + def testSetReleaseTrack(self): + """Ensure we can set the device's release track (channel).""" + release_track = self.GetUpdateInfo()['release_track'] + for track in ('dev-channel', 'beta-channel', release_track): + self.SetReleaseTrack(track) + self.assertEqual(self.GetUpdateInfo()['release_track'], track) + + def testGetUpdateInfo(self): + """Get some status info about the updater and release track.""" + result = self.GetUpdateInfo() + self.assertTrue(result) + logging.debug(result) + + +if __name__ == '__main__': + pyauto_functional.Main() |