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

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

Issue 3012039: Add ExecuteJavascript() method to PyUITestBase (Closed)
Patch Set: merge to head Created 10 years, 4 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2010 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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid()) 1371 raw_input('Attach debugger to process %s and hit <enter> ' % os.getpid())
1372 1372
1373 suite_args = [sys.argv[0]] 1373 suite_args = [sys.argv[0]]
1374 chrome_flags = self._options.chrome_flags 1374 chrome_flags = self._options.chrome_flags
1375 # Enable crash reporter by default on posix. 1375 # Enable crash reporter by default on posix.
1376 # On windows, the choice to enable/disable crash reporting is made when 1376 # On windows, the choice to enable/disable crash reporting is made when
1377 # downloading the installer. 1377 # downloading the installer.
1378 # TODO(nirnimesh): Figure out a way to control this from here on Win too. 1378 # TODO(nirnimesh): Figure out a way to control this from here on Win too.
1379 if PyUITest.IsPosix(): 1379 if PyUITest.IsPosix():
1380 chrome_flags += ' --enable-crash-reporter' 1380 chrome_flags += ' --enable-crash-reporter'
1381 chrome_flags += ' --dom-automation'
John Grabowski 2010/08/03 06:42:45 add comment explaining what this does; unlike --en
Dirk Pranke 2010/08/04 21:44:12 Done.
1381 if chrome_flags: 1382 if chrome_flags:
1382 suite_args.append('--extra-chrome-flags=%s' % chrome_flags) 1383 suite_args.append('--extra-chrome-flags=%s' % chrome_flags)
1383 pyauto_suite = PyUITestSuite(suite_args) 1384 pyauto_suite = PyUITestSuite(suite_args)
1384 loaded_tests = self._LoadTests(self._args) 1385 loaded_tests = self._LoadTests(self._args)
1385 pyauto_suite.addTests(loaded_tests) 1386 pyauto_suite.addTests(loaded_tests)
1386 verbosity = 1 1387 verbosity = 1
1387 if self._options.verbose: 1388 if self._options.verbose:
1388 verbosity = 2 1389 verbosity = 2
1389 result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite) 1390 result = unittest.TextTestRunner(verbosity=verbosity).run(pyauto_suite)
1390 del loaded_tests # Need to destroy test cases before the suite 1391 del loaded_tests # Need to destroy test cases before the suite
1391 del pyauto_suite 1392 del pyauto_suite
1392 sys.exit(not result.wasSuccessful()) 1393 sys.exit(not result.wasSuccessful())
1393 1394
1394 1395
1395 if __name__ == '__main__': 1396 if __name__ == '__main__':
1396 Main() 1397 Main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698