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

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

Issue 9314006: [pyauto] Convenience method to determine if we're on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 u'y': 44}]} 1585 u'y': 44}]}
1586 1586
1587 Raises: 1587 Raises:
1588 pyauto_errors.JSONInterfaceError if the automation call returns an error. 1588 pyauto_errors.JSONInterfaceError if the automation call returns an error.
1589 """ 1589 """
1590 cmd_dict = { # Prepare command for the json interface 1590 cmd_dict = { # Prepare command for the json interface
1591 'command': 'GetBrowserInfo', 1591 'command': 'GetBrowserInfo',
1592 } 1592 }
1593 return self._GetResultFromJSONRequest(cmd_dict, windex=None) 1593 return self._GetResultFromJSONRequest(cmd_dict, windex=None)
1594 1594
1595 def IsAura(self):
1596 """Is this Aura?"""
1597 return self.GetBrowserInfo()['properties']['aura']
1598
1595 def GetProcessInfo(self): 1599 def GetProcessInfo(self):
1596 """Returns information about browser-related processes that currently exist. 1600 """Returns information about browser-related processes that currently exist.
1597 1601
1598 This will also return information about other currently-running browsers 1602 This will also return information about other currently-running browsers
1599 besides just Chrome. 1603 besides just Chrome.
1600 1604
1601 Returns: 1605 Returns:
1602 A dictionary containing browser-related process information as identified 1606 A dictionary containing browser-related process information as identified
1603 by class MemoryDetails in src/chrome/browser/memory_details.h. The 1607 by class MemoryDetails in src/chrome/browser/memory_details.h. The
1604 dictionary contains a single key 'browsers', mapped to a list of 1608 dictionary contains a single key 'browsers', mapped to a list of
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4914 successful = result.wasSuccessful() 4918 successful = result.wasSuccessful()
4915 if not successful: 4919 if not successful:
4916 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename) 4920 pyauto_tests_file = os.path.join(self.TestsDir(), self._tests_filename)
4917 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \ 4921 print >>sys.stderr, 'Tests can be disabled by editing %s. ' \
4918 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL) 4922 'Ref: %s' % (pyauto_tests_file, _PYAUTO_DOC_URL)
4919 sys.exit(not successful) 4923 sys.exit(not successful)
4920 4924
4921 4925
4922 if __name__ == '__main__': 4926 if __name__ == '__main__':
4923 Main() 4927 Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698