| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 def additional_resources(self): | 173 def additional_resources(self): |
| 174 return ['content_resources.pak', 'content_shell.pak', 'shell_resources.p
ak'] | 174 return ['content_resources.pak', 'content_shell.pak', 'shell_resources.p
ak'] |
| 175 | 175 |
| 176 def command_line_file(self): | 176 def command_line_file(self): |
| 177 return '/data/local/tmp/content-shell-command-line' | 177 return '/data/local/tmp/content-shell-command-line' |
| 178 | 178 |
| 179 def device_crash_dumps_directory(self): | 179 def device_crash_dumps_directory(self): |
| 180 return '/data/local/tmp/content-shell-crash-dumps' | 180 return '/data/local/tmp/content-shell-crash-dumps' |
| 181 | 181 |
| 182 def additional_command_line_flags(self, use_breakpad): | 182 def additional_command_line_flags(self, use_breakpad): |
| 183 flags = ['--run-layout-test', '--encode-binary'] | 183 flags = ['--encode-binary'] |
| 184 if use_breakpad: | 184 if use_breakpad: |
| 185 flags.extend(['--enable-crash-reporter', '--crash-dumps-dir=%s' % se
lf.device_crash_dumps_directory()]) | 185 flags.extend(['--enable-crash-reporter', '--crash-dumps-dir=%s' % se
lf.device_crash_dumps_directory()]) |
| 186 return flags | 186 return flags |
| 187 | 187 |
| 188 def device_directory(self): | 188 def device_directory(self): |
| 189 return DEVICE_SOURCE_ROOT_DIR + 'content_shell/' | 189 return DEVICE_SOURCE_ROOT_DIR + 'content_shell/' |
| 190 | 190 |
| 191 | 191 |
| 192 # The AndroidCommands class encapsulates commands to communicate with an attache
d device. | 192 # The AndroidCommands class encapsulates commands to communicate with an attache
d device. |
| 193 class AndroidCommands(object): | 193 class AndroidCommands(object): |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 def path_to_forwarder(self): | 454 def path_to_forwarder(self): |
| 455 return self._build_path('forwarder') | 455 return self._build_path('forwarder') |
| 456 | 456 |
| 457 def path_to_md5sum(self): | 457 def path_to_md5sum(self): |
| 458 return self._build_path(MD5SUM_DEVICE_FILE_NAME) | 458 return self._build_path(MD5SUM_DEVICE_FILE_NAME) |
| 459 | 459 |
| 460 def path_to_md5sum_host(self): | 460 def path_to_md5sum_host(self): |
| 461 return self._build_path(MD5SUM_HOST_FILE_NAME) | 461 return self._build_path(MD5SUM_HOST_FILE_NAME) |
| 462 | 462 |
| 463 def additional_driver_flag(self): | 463 def additional_driver_flag(self): |
| 464 return self._driver_details.additional_command_line_flags(use_breakpad=n
ot self.get_option('disable_breakpad')) | 464 return super(AndroidPort, self).additional_driver_flag() + self._driver_
details.additional_command_line_flags(use_breakpad=not self.get_option('disable_
breakpad')) |
| 465 | 465 |
| 466 def default_timeout_ms(self): | 466 def default_timeout_ms(self): |
| 467 # Android platform has less computing power than desktop platforms. | 467 # Android platform has less computing power than desktop platforms. |
| 468 # Using 10 seconds allows us to pass most slow tests which are not | 468 # Using 10 seconds allows us to pass most slow tests which are not |
| 469 # marked as slow tests on desktop platforms. | 469 # marked as slow tests on desktop platforms. |
| 470 return 10 * 1000 | 470 return 10 * 1000 |
| 471 | 471 |
| 472 def driver_stop_timeout(self): | 472 def driver_stop_timeout(self): |
| 473 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. | 473 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. |
| 474 return 0.0 | 474 return 0.0 |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1286 return command | 1286 return command |
| 1287 | 1287 |
| 1288 def _read_prompt(self, deadline): | 1288 def _read_prompt(self, deadline): |
| 1289 last_char = '' | 1289 last_char = '' |
| 1290 while True: | 1290 while True: |
| 1291 current_char = self._server_process.read_stdout(deadline, 1) | 1291 current_char = self._server_process.read_stdout(deadline, 1) |
| 1292 if current_char == ' ': | 1292 if current_char == ' ': |
| 1293 if last_char in ('#', '$'): | 1293 if last_char in ('#', '$'): |
| 1294 return | 1294 return |
| 1295 last_char = current_char | 1295 last_char = current_char |
| OLD | NEW |