Chromium Code Reviews| Index: functional/protector_updater.py |
| =================================================================== |
| --- functional/protector_updater.py (revision 0) |
| +++ functional/protector_updater.py (revision 0) |
| @@ -0,0 +1,44 @@ |
| +#!/usr/bin/env python |
| +# Copyright (c) 2012 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. |
| + |
| +"""protector_updater.py: Runs Protector updater tests using two Chrome builds. |
| + |
| +Test requires two arguments: build url and chrome versions to be used, rest of |
| +the arguments are optional. The builds specified are sorted before installation |
| +begins, meaning lowest version of Chrome gets installed first and then Chrome |
| +is updated using the next, higher version of Chrome. Install and Update, which |
| +are both handled by the base class, return a pyauto.PyUITest object. PyUITest |
| +object can then be used to run updater tests. |
| + |
| +Example: |
| + $ python Chrome-Protector.py --url=http://chrome-master2.mtv.corp.google. \ |
|
kkania
2012/06/14 17:20:33
this is out of date
nkang
2012/06/28 19:02:39
Fixed.
|
| + com/official_builds/ --builds=19.0.1069.0,190.0.1070.0 |
|
kkania
2012/06/14 17:20:33
190!
nkang
2012/06/28 19:02:39
It was supposed to be 19. Just making sure you wer
|
| +""" |
| + |
| +import os |
| +import sys |
| +import unittest |
| + |
| +os.sys.path.append(os.path.join(os.path.pardir, 'install_test')) |
| +from install_test import InstallTest |
| +from py_unittest_util import GTestTextTestRunner |
| + |
| + |
| +class ProtectorUpdater(InstallTest): |
| + """Class to run Protector Updater tests.""" |
| + |
| + def __init__(self, methodName='runTest'): |
| + InstallTest.__init__(self, methodName) |
| + |
| + def testNoChangeOnCleanProfile(self): |
| + """Sample Protector test""" |
|
kkania
2012/06/14 17:20:33
Comments on their own line are always supposed to
nkang
2012/06/28 19:02:39
Yes they are and so shall this one ;)
|
| + self.assertFalse(self._pyauto.GetProtectorState()['showing_change']) |
| + self.UpdateBuild() |
| + self.assertFalse(self._pyauto.GetProtectorState()['showing_change']) |
| + |
| + |
| +if __name__ == '__main__': |
| + suite = unittest.TestLoader().loadTestsFromTestCase(ProtectorUpdater) |
| + sys.exit(GTestTextTestRunner(verbosity=1).run(suite)) |
| Property changes on: functional\protector_updater.py |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |