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

Side by Side Diff: telemetry/telemetry/internal/browser/browser.py

Issue 2784233006: Expose AppUi from devil utils in browser (Closed)
Patch Set: Created 3 years, 8 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 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import logging 5 import logging
6 import sys 6 import sys
7 7
8 from py_utils import cloud_storage # pylint: disable=import-error 8 from py_utils import cloud_storage # pylint: disable=import-error
9 9
10 from telemetry.core import exceptions 10 from telemetry.core import exceptions
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 return self._browser_backend.GetAllUnsymbolizedMinidumpPaths() 299 return self._browser_backend.GetAllUnsymbolizedMinidumpPaths()
300 300
301 def SymbolizeMinidump(self, minidump_path): 301 def SymbolizeMinidump(self, minidump_path):
302 """Given a minidump path, this method returns a tuple with the 302 """Given a minidump path, this method returns a tuple with the
303 first value being whether or not the minidump was able to be 303 first value being whether or not the minidump was able to be
304 symbolized and the second being that symbolized dump when true 304 symbolized and the second being that symbolized dump when true
305 and error message when false.""" 305 and error message when false."""
306 return self._browser_backend.SymbolizeMinidump(minidump_path) 306 return self._browser_backend.SymbolizeMinidump(minidump_path)
307 307
308 @property 308 @property
309 def supports_app_ui_interactions(self):
310 """True if the browser backend supports app UI interactions."""
nednguyen 2017/04/06 16:57:29 """True if the browser supports Android app UI int
ssid 2017/04/13 20:07:39 Done.
311 return self._browser_backend.supports_app_ui_interactions
312
313 @property
314 def app_ui(self):
315 """Returns an AppUi object to interact with app's UI.
316
317 See devil.android.app_ui for the documentation of the API provided."""
318 assert self.supports_app_ui_interactions
319 return self._browser_backend.app_ui
320
321 @property
309 def supports_system_info(self): 322 def supports_system_info(self):
310 return self._browser_backend.supports_system_info 323 return self._browser_backend.supports_system_info
311 324
312 def GetSystemInfo(self): 325 def GetSystemInfo(self):
313 """Returns low-level information about the system, if available. 326 """Returns low-level information about the system, if available.
314 327
315 See the documentation of the SystemInfo class for more details.""" 328 See the documentation of the SystemInfo class for more details."""
316 return self._browser_backend.GetSystemInfo() 329 return self._browser_backend.GetSystemInfo()
317 330
318 @property 331 @property
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 except Exception: 369 except Exception:
357 logging.exception('Failed to get browser standard output:') 370 logging.exception('Failed to get browser standard output:')
358 logging.info('*********** END OF BROWSER STANDARD OUTPUT ************') 371 logging.info('*********** END OF BROWSER STANDARD OUTPUT ************')
359 372
360 logging.info('********************* BROWSER LOG *********************') 373 logging.info('********************* BROWSER LOG *********************')
361 try: # pylint: disable=broad-except 374 try: # pylint: disable=broad-except
362 logging.info(self.GetLogFileContents()) 375 logging.info(self.GetLogFileContents())
363 except Exception: 376 except Exception:
364 logging.exception('Failed to get browser log:') 377 logging.exception('Failed to get browser log:')
365 logging.info('***************** END OF BROWSER LOG ******************') 378 logging.info('***************** END OF BROWSER LOG ******************')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698