| OLD | NEW |
| 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 class ChromiumAndroidPort(chromium.ChromiumPort): | 161 class ChromiumAndroidPort(chromium.ChromiumPort): |
| 162 port_name = 'chromium-android' | 162 port_name = 'chromium-android' |
| 163 | 163 |
| 164 # Avoid initializing the adb path [worker count]+1 times by storing it as a
static member. | 164 # Avoid initializing the adb path [worker count]+1 times by storing it as a
static member. |
| 165 _adb_path = None | 165 _adb_path = None |
| 166 | 166 |
| 167 FALLBACK_PATHS = [ | 167 FALLBACK_PATHS = [ |
| 168 'chromium-android', | 168 'chromium-android', |
| 169 'chromium-linux', | 169 'chromium-linux', |
| 170 'chromium-win', | 170 'chromium-win', |
| 171 'chromium', | |
| 172 ] | 171 ] |
| 173 | 172 |
| 174 def __init__(self, host, port_name, **kwargs): | 173 def __init__(self, host, port_name, **kwargs): |
| 175 super(ChromiumAndroidPort, self).__init__(host, port_name, **kwargs) | 174 super(ChromiumAndroidPort, self).__init__(host, port_name, **kwargs) |
| 176 | 175 |
| 177 self._operating_system = 'android' | 176 self._operating_system = 'android' |
| 178 self._version = 'icecreamsandwich' | 177 self._version = 'icecreamsandwich' |
| 179 | 178 |
| 180 self._host_port = factory.PortFactory(host).get('chromium', **kwargs) | 179 self._host_port = factory.PortFactory(host).get('chromium', **kwargs) |
| 181 self._server_process_constructor = self._android_server_process_construc
tor | 180 self._server_process_constructor = self._android_server_process_construc
tor |
| (...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 925 current_char = self._server_process.read_stdout(deadline, 1) | 924 current_char = self._server_process.read_stdout(deadline, 1) |
| 926 if current_char == ' ': | 925 if current_char == ' ': |
| 927 if last_char in ('#', '$'): | 926 if last_char in ('#', '$'): |
| 928 return | 927 return |
| 929 last_char = current_char | 928 last_char = current_char |
| 930 | 929 |
| 931 def _adb_command(self): | 930 def _adb_command(self): |
| 932 if not self._adb_command_base: | 931 if not self._adb_command_base: |
| 933 self._adb_command_base = [self._port.path_to_adb(), '-s', self._devi
ce_serial] | 932 self._adb_command_base = [self._port.path_to_adb(), '-s', self._devi
ce_serial] |
| 934 return self._adb_command_base | 933 return self._adb_command_base |
| OLD | NEW |