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

Unified Diff: functional/protector_updater.py

Issue 10384104: Chrome updater test framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: Created 8 years, 6 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 | « no previous file | install_test/chrome_checkout.py » ('j') | install_test/chrome_checkout.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: functional/protector_updater.py
===================================================================
--- functional/protector_updater.py (revision 0)
+++ functional/protector_updater.py (revision 0)
@@ -0,0 +1,46 @@
+#!/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.
+# 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.
Nirnimesh 2012/07/04 00:39:19 Remove file name.
nkang 2012/07/13 23:50:50 It's gone!
+
+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://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.
+ official_builds/ --builds=19.0.1069.0,19.0.1070.0
+"""
+
+import os
+import sys
+import unittest
+
+# Set path variable before importing install_test and GT3Runner because these
+# modules are not in the same directory as protector_updater.
+sys.path.append(os.path.join(os.path.pardir, 'install_test'))
+
+import install_test
+from py_unittest_util import GTestTextTestRunner
+
+
+class ProtectorUpdater(install_test.InstallTest):
+ """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'.
+
+ 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
+ install_test.InstallTest.__init__(self, methodName)
+
+ def testNoChangeOnCleanProfile(self):
+ """Sample Protector test."""
+ self.assertFalse(self._pyauto.GetProtectorState()['showing_change'])
+ self.UpdateBuild()
+ self.assertFalse(self._pyauto.GetProtectorState()['showing_change'])
+
+
+if __name__ == '__main__':
+ install_test.Main()
Property changes on: functional\protector_updater.py
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | install_test/chrome_checkout.py » ('j') | install_test/chrome_checkout.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698