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

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

Issue 11412067: [rlz,cros] RLZ glue for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years 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
« no previous file with comments | « chrome/common/pref_names.cc ('k') | rlz/lib/financial_ping.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """PyAuto: Python Interface to Chromium's Automation Proxy. 6 """PyAuto: Python Interface to Chromium's Automation Proxy.
7 7
8 PyAuto uses swig to expose Automation Proxy interfaces to Python. 8 PyAuto uses swig to expose Automation Proxy interfaces to Python.
9 For complete documentation on the functionality available, 9 For complete documentation on the functionality available,
10 run pydoc on this file. 10 run pydoc on this file.
(...skipping 4512 matching lines...) Expand 10 before | Expand all | Expand 10 after
4523 A dictionary with the following keys: 4523 A dictionary with the following keys:
4524 4524
4525 'next_screen': The title of the next OOBE screen as a string. 4525 'next_screen': The title of the next OOBE screen as a string.
4526 4526
4527 Raises: 4527 Raises:
4528 pyauto_errors.JSONInterfaceError if the automation call returns an error. 4528 pyauto_errors.JSONInterfaceError if the automation call returns an error.
4529 """ 4529 """
4530 cmd_dict = { 'command': 'AcceptOOBENetworkScreen' } 4530 cmd_dict = { 'command': 'AcceptOOBENetworkScreen' }
4531 return self._GetResultFromJSONRequest(cmd_dict, windex=None) 4531 return self._GetResultFromJSONRequest(cmd_dict, windex=None)
4532 4532
4533 def AcceptOOBEEula(self, accepted, usage_stats_reporting=False): 4533 def AcceptOOBEEula(self, accepted, usage_stats_reporting=False,
4534 rlz_enabled=False):
4534 """Accepts OOBE EULA and advances to the next screen. 4535 """Accepts OOBE EULA and advances to the next screen.
4535 4536
4536 Assumes that we're already at the OOBE EULA screen. 4537 Assumes that we're already at the OOBE EULA screen.
4537 4538
4538 Args: 4539 Args:
4539 accepted: Boolean indicating whether the EULA should be accepted. 4540 accepted: Boolean indicating whether the EULA should be accepted.
4540 usage_stats_reporting: Boolean indicating whether UMA should be enabled. 4541 usage_stats_reporting: Boolean indicating whether UMA should be enabled.
4542 rlz_enabled: Boolean indicating whether RLZ should be enabled.
4541 4543
4542 Returns: 4544 Returns:
4543 A dictionary with the following keys: 4545 A dictionary with the following keys:
4544 4546
4545 'next_screen': The title of the next OOBE screen as a string. 4547 'next_screen': The title of the next OOBE screen as a string.
4546 4548
4547 Raises: 4549 Raises:
4548 pyauto_errors.JSONInterfaceError if the automation call returns an error. 4550 pyauto_errors.JSONInterfaceError if the automation call returns an error.
4549 """ 4551 """
4550 cmd_dict = { 'command': 'AcceptOOBEEula', 4552 cmd_dict = { 'command': 'AcceptOOBEEula',
4551 'accepted': accepted, 4553 'accepted': accepted,
4552 'usage_stats_reporting': usage_stats_reporting } 4554 'usage_stats_reporting': usage_stats_reporting,
4555 'rlz_enabled': rlz_enabled }
4553 return self._GetResultFromJSONRequest(cmd_dict, windex=None) 4556 return self._GetResultFromJSONRequest(cmd_dict, windex=None)
4554 4557
4555 def CancelOOBEUpdate(self): 4558 def CancelOOBEUpdate(self):
4556 """Skips update on OOBE and advances to the next screen. 4559 """Skips update on OOBE and advances to the next screen.
4557 4560
4558 Returns: 4561 Returns:
4559 A dictionary with the following keys: 4562 A dictionary with the following keys:
4560 4563
4561 'next_screen': The title of the next OOBE screen as a string. 4564 'next_screen': The title of the next OOBE screen as a string.
4562 4565
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
6531 successful = result.wasSuccessful() 6534 successful = result.wasSuccessful()
6532 if not successful: 6535 if not successful:
6533 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) 6536 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename)
6534 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ 6537 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \
6535 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) 6538 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL)
6536 sys.exit(not successful) 6539 sys.exit(not successful)
6537 6540
6538 6541
6539 if __name__ == '__main__': 6542 if __name__ == '__main__':
6540 Main() 6543 Main()
OLDNEW
« no previous file with comments | « chrome/common/pref_names.cc ('k') | rlz/lib/financial_ping.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698