| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 | 419 |
| 420 self._operating_system = 'android' | 420 self._operating_system = 'android' |
| 421 self._version = 'icecreamsandwich' | 421 self._version = 'icecreamsandwich' |
| 422 | 422 |
| 423 self._host_port = factory.PortFactory(host).get('chromium', **kwargs) | 423 self._host_port = factory.PortFactory(host).get('chromium', **kwargs) |
| 424 self._server_process_constructor = self._android_server_process_construc
tor | 424 self._server_process_constructor = self._android_server_process_construc
tor |
| 425 | 425 |
| 426 if not self.get_option('disable_breakpad'): | 426 if not self.get_option('disable_breakpad'): |
| 427 self._dump_reader = DumpReaderAndroid(host, self._build_path()) | 427 self._dump_reader = DumpReaderAndroid(host, self._build_path()) |
| 428 | 428 |
| 429 if self.driver_name() != self.CONTENT_SHELL_NAME: | |
| 430 raise AssertionError('Layout tests on Android only support content_s
hell as the driver.') | |
| 431 | |
| 432 self._driver_details = ContentShellDriverDetails() | 429 self._driver_details = ContentShellDriverDetails() |
| 433 | 430 |
| 434 # Initialize the AndroidDevices class which tracks available devices. | 431 # Initialize the AndroidDevices class which tracks available devices. |
| 435 default_device = None | 432 default_device = None |
| 436 if hasattr(self._options, 'adb_device') and len(self._options.adb_device
): | 433 if hasattr(self._options, 'adb_device') and len(self._options.adb_device
): |
| 437 default_device = self._options.adb_device | 434 default_device = self._options.adb_device |
| 438 | 435 |
| 439 self._debug_logging = self.get_option('android_logging') | 436 self._debug_logging = self.get_option('android_logging') |
| 440 self._devices = AndroidDevices(self._executive, default_device, self._de
bug_logging) | 437 self._devices = AndroidDevices(self._executive, default_device, self._de
bug_logging) |
| 441 | 438 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 453 # Local public methods. | 450 # Local public methods. |
| 454 def path_to_forwarder(self): | 451 def path_to_forwarder(self): |
| 455 return self._build_path('forwarder') | 452 return self._build_path('forwarder') |
| 456 | 453 |
| 457 def path_to_md5sum(self): | 454 def path_to_md5sum(self): |
| 458 return self._build_path(MD5SUM_DEVICE_FILE_NAME) | 455 return self._build_path(MD5SUM_DEVICE_FILE_NAME) |
| 459 | 456 |
| 460 def path_to_md5sum_host(self): | 457 def path_to_md5sum_host(self): |
| 461 return self._build_path(MD5SUM_HOST_FILE_NAME) | 458 return self._build_path(MD5SUM_HOST_FILE_NAME) |
| 462 | 459 |
| 463 def additional_drt_flag(self): | |
| 464 return self._driver_details.additional_command_line_flags(use_breakpad=n
ot self.get_option('disable_breakpad')) | |
| 465 | |
| 466 def default_timeout_ms(self): | 460 def default_timeout_ms(self): |
| 467 # Android platform has less computing power than desktop platforms. | 461 # Android platform has less computing power than desktop platforms. |
| 468 # Using 10 seconds allows us to pass most slow tests which are not | 462 # Using 10 seconds allows us to pass most slow tests which are not |
| 469 # marked as slow tests on desktop platforms. | 463 # marked as slow tests on desktop platforms. |
| 470 return 10 * 1000 | 464 return 10 * 1000 |
| 471 | 465 |
| 472 def driver_stop_timeout(self): | 466 def driver_stop_timeout(self): |
| 473 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. | 467 # The driver doesn't respond to closing stdin, so we might as well stop
the driver immediately. |
| 474 return 0.0 | 468 return 0.0 |
| 475 | 469 |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 return command | 1262 return command |
| 1269 | 1263 |
| 1270 def _read_prompt(self, deadline): | 1264 def _read_prompt(self, deadline): |
| 1271 last_char = '' | 1265 last_char = '' |
| 1272 while True: | 1266 while True: |
| 1273 current_char = self._server_process.read_stdout(deadline, 1) | 1267 current_char = self._server_process.read_stdout(deadline, 1) |
| 1274 if current_char == ' ': | 1268 if current_char == ' ': |
| 1275 if last_char in ('#', '$'): | 1269 if last_char in ('#', '$'): |
| 1276 return | 1270 return |
| 1277 last_char = current_char | 1271 last_char = current_char |
| OLD | NEW |