Chromium Code Reviews
|
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
|
Nirnimesh
2012/07/04 00:39:19
It should go in install_test dir, not functional
nkang
2012/07/13 23:50:50
Moved protector_updater.py to install_test.
| |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 """protector_updater.py: Runs Protector updater tests using two Chrome builds. | |
|
Nirnimesh
2012/07/04 00:39:19
Remove file name.
nkang
2012/07/13 23:50:50
It's gone!
| |
| 7 | |
| 8 Test requires two arguments: build url and chrome versions to be used, rest of | |
| 9 the arguments are optional. The builds specified are sorted before installation | |
| 10 begins, meaning lowest version of Chrome gets installed first and then Chrome | |
| 11 is updated using the next, higher version of Chrome. Install and Update, which | |
| 12 are both handled by the base class, return a pyauto.PyUITest object. PyUITest | |
| 13 object can then be used to run updater tests. | |
| 14 | |
| 15 Example: | |
| 16 $ python Chrome-Protector.py --url=http://master.chrome.corp.google.com/ \ | |
|
Nirnimesh
2012/07/04 00:39:19
do not include internal URLs
nkang
2012/07/13 23:50:50
Removed the internal URL.
| |
| 17 official_builds/ --builds=19.0.1069.0,19.0.1070.0 | |
| 18 """ | |
| 19 | |
| 20 import os | |
| 21 import sys | |
| 22 import unittest | |
| 23 | |
| 24 # Set path variable before importing install_test and GT3Runner because these | |
| 25 # modules are not in the same directory as protector_updater. | |
| 26 sys.path.append(os.path.join(os.path.pardir, 'install_test')) | |
| 27 | |
| 28 import install_test | |
| 29 from py_unittest_util import GTestTextTestRunner | |
| 30 | |
| 31 | |
| 32 class ProtectorUpdater(install_test.InstallTest): | |
| 33 """Class to run Protector Updater tests.""" | |
|
Nirnimesh
2012/07/04 00:39:19
Update tests for protector
nkang
2012/07/13 23:50:50
Changed docstring to 'Update tests for Protector'.
| |
| 34 | |
| 35 def __init__(self, methodName='runTest'): | |
|
Nirnimesh
2012/07/04 00:39:19
why override __init__ if you're going to do the de
nkang
2012/07/13 23:50:50
This is just a sample test that I created for illu
| |
| 36 install_test.InstallTest.__init__(self, methodName) | |
| 37 | |
| 38 def testNoChangeOnCleanProfile(self): | |
| 39 """Sample Protector test.""" | |
| 40 self.assertFalse(self._pyauto.GetProtectorState()['showing_change']) | |
| 41 self.UpdateBuild() | |
| 42 self.assertFalse(self._pyauto.GetProtectorState()['showing_change']) | |
| 43 | |
| 44 | |
| 45 if __name__ == '__main__': | |
| 46 install_test.Main() | |
| OLD | NEW |