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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/android.py

Issue 2811993002: [devil refactor] Prepare clients for DeviceUnreachableError (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
« no previous file with comments | « build/android/tombstones.py ('k') | tools/cygprofile/profile_android_startup.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2012 Google Inc. All rights reserved. 1 # Copyright (C) 2012 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 self._push_file_if_needed(self._port._build_path('android_main_fonts.xml '), 786 self._push_file_if_needed(self._port._build_path('android_main_fonts.xml '),
787 self._driver_details.device_directory() + 'and roid_main_fonts.xml', log_callback) 787 self._driver_details.device_directory() + 'and roid_main_fonts.xml', log_callback)
788 self._push_file_if_needed(self._port._build_path('android_fallback_fonts .xml'), 788 self._push_file_if_needed(self._port._build_path('android_fallback_fonts .xml'),
789 self._driver_details.device_directory() + 'and roid_fallback_fonts.xml', log_callback) 789 self._driver_details.device_directory() + 'and roid_fallback_fonts.xml', log_callback)
790 790
791 try: 791 try:
792 driver_host_path = self._port._path_to_driver() # pylint: disable=p rotected-access 792 driver_host_path = self._port._path_to_driver() # pylint: disable=p rotected-access
793 log_callback('installing apk if necessary') 793 log_callback('installing apk if necessary')
794 self._device.Install(driver_host_path) 794 self._device.Install(driver_host_path)
795 except (device_errors.CommandFailedError, 795 except (device_errors.CommandFailedError,
796 device_errors.CommandTimeoutError) as exc: 796 device_errors.CommandTimeoutError,
797 device_errors.DeviceUnreachableError) as exc:
797 self._abort('Failed to install %s onto device: %s' % (driver_host_pa th, str(exc))) 798 self._abort('Failed to install %s onto device: %s' % (driver_host_pa th, str(exc)))
798 799
799 def _push_fonts(self, log_callback): 800 def _push_fonts(self, log_callback):
800 path_to_ahem_font = self._port._build_path('AHEM____.TTF') 801 path_to_ahem_font = self._port._build_path('AHEM____.TTF')
801 self._push_file_if_needed(path_to_ahem_font, self._driver_details.device _fonts_directory() + 'AHEM____.TTF', log_callback) 802 self._push_file_if_needed(path_to_ahem_font, self._driver_details.device _fonts_directory() + 'AHEM____.TTF', log_callback)
802 for (host_dirs, font_file, _) in HOST_FONT_FILES: 803 for (host_dirs, font_file, _) in HOST_FONT_FILES:
803 for host_dir in host_dirs: 804 for host_dir in host_dirs:
804 host_font_path = host_dir + font_file 805 host_font_path = host_dir + font_file
805 if self._port._check_file_exists(host_font_path, '', more_loggin g=False): 806 if self._port._check_file_exists(host_font_path, '', more_loggin g=False):
806 self._push_file_if_needed( 807 self._push_file_if_needed(
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 return command 1127 return command
1127 1128
1128 def _read_prompt(self, deadline): 1129 def _read_prompt(self, deadline):
1129 last_char = '' 1130 last_char = ''
1130 while True: 1131 while True:
1131 current_char = self._server_process.read_stdout(deadline, 1) 1132 current_char = self._server_process.read_stdout(deadline, 1)
1132 if current_char == ' ': 1133 if current_char == ' ':
1133 if last_char in ('#', '$'): 1134 if last_char in ('#', '$'):
1134 return 1135 return
1135 last_char = current_char 1136 last_char = current_char
OLDNEW
« no previous file with comments | « build/android/tombstones.py ('k') | tools/cygprofile/profile_android_startup.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698