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

Side by Side Diff: chrome/test/pyautolib/pyauto.py

Issue 6962035: Build pyautolib target under clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove virtual Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """PyAuto: Python Interface to Chromium's Automation Proxy. 7 """PyAuto: Python Interface to Chromium's Automation Proxy.
8 8
9 PyAuto uses swig to expose Automation Proxy interfaces to Python. 9 PyAuto uses swig to expose Automation Proxy interfaces to Python.
10 For complete documentation on the functionality available, 10 For complete documentation on the functionality available,
(...skipping 3217 matching lines...) Expand 10 before | Expand all | Expand 10 after
3228 3228
3229 class PyUITestSuite(pyautolib.PyUITestSuiteBase, unittest.TestSuite): 3229 class PyUITestSuite(pyautolib.PyUITestSuiteBase, unittest.TestSuite):
3230 """Base TestSuite for PyAuto UI tests.""" 3230 """Base TestSuite for PyAuto UI tests."""
3231 3231
3232 def __init__(self, args): 3232 def __init__(self, args):
3233 pyautolib.PyUITestSuiteBase.__init__(self, args) 3233 pyautolib.PyUITestSuiteBase.__init__(self, args)
3234 3234
3235 # Figure out path to chromium binaries 3235 # Figure out path to chromium binaries
3236 browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__)) 3236 browser_dir = os.path.normpath(os.path.dirname(pyautolib.__file__))
3237 logging.debug('Loading pyauto libs from %s', browser_dir) 3237 logging.debug('Loading pyauto libs from %s', browser_dir)
3238 self.Initialize(pyautolib.FilePath(browser_dir)) 3238 self.InitializeWithPath(pyautolib.FilePath(browser_dir))
3239 os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH'] 3239 os.environ['PATH'] = browser_dir + os.pathsep + os.environ['PATH']
3240 3240
3241 unittest.TestSuite.__init__(self) 3241 unittest.TestSuite.__init__(self)
3242 cr_source_root = os.path.normpath(os.path.join( 3242 cr_source_root = os.path.normpath(os.path.join(
3243 os.path.dirname(__file__), os.pardir, os.pardir, os.pardir)) 3243 os.path.dirname(__file__), os.pardir, os.pardir, os.pardir))
3244 self.SetCrSourceRoot(pyautolib.FilePath(cr_source_root)) 3244 self.SetCrSourceRoot(pyautolib.FilePath(cr_source_root))
3245 3245
3246 # Start http server, if needed. 3246 # Start http server, if needed.
3247 global _OPTIONS 3247 global _OPTIONS
3248 if not _OPTIONS.no_http_server: 3248 if not _OPTIONS.no_http_server:
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 if self._options.verbose: 3615 if self._options.verbose:
3616 verbosity = 2 3616 verbosity = 2
3617 result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite) 3617 result = PyAutoTextTestRuner(verbosity=verbosity).run(pyauto_suite)
3618 del loaded_tests # Need to destroy test cases before the suite 3618 del loaded_tests # Need to destroy test cases before the suite
3619 del pyauto_suite 3619 del pyauto_suite
3620 sys.exit(not result.wasSuccessful()) 3620 sys.exit(not result.wasSuccessful())
3621 3621
3622 3622
3623 if __name__ == '__main__': 3623 if __name__ == '__main__':
3624 Main() 3624 Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698