| 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 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 # The returned command line is used to start _server_process. In our cas
e, it's an interactive 'adb shell'. | 1064 # The returned command line is used to start _server_process. In our cas
e, it's an interactive 'adb shell'. |
| 1065 # The command line passed to the driver process is returned by _driver_c
md_line() instead. | 1065 # The command line passed to the driver process is returned by _driver_c
md_line() instead. |
| 1066 return self._android_commands.adb_command() + ['shell'] | 1066 return self._android_commands.adb_command() + ['shell'] |
| 1067 | 1067 |
| 1068 def _android_driver_cmd_line(self, pixel_tests, per_test_args): | 1068 def _android_driver_cmd_line(self, pixel_tests, per_test_args): |
| 1069 # FIXME: We can't enable slimming paint before crbug.com/439457 is fixed
. | 1069 # FIXME: We can't enable slimming paint before crbug.com/439457 is fixed
. |
| 1070 cmd_line = driver.Driver.cmd_line(self, pixel_tests, per_test_args) | 1070 cmd_line = driver.Driver.cmd_line(self, pixel_tests, per_test_args) |
| 1071 if '--enable-slimming-paint' in cmd_line: | 1071 if '--enable-slimming-paint' in cmd_line: |
| 1072 _log.warning('Android port doesn\'t support slimming paint because o
f crbug.com/439457') | 1072 _log.warning('Android port doesn\'t support slimming paint because o
f crbug.com/439457') |
| 1073 cmd_line.remove('--enable-slimming-paint') | 1073 cmd_line.remove('--enable-slimming-paint') |
| 1074 cmd_line.append('--disable-slimming-paint') |
| 1074 return cmd_line | 1075 return cmd_line |
| 1075 | 1076 |
| 1076 @staticmethod | 1077 @staticmethod |
| 1077 def _loop_with_timeout(condition, timeout_secs): | 1078 def _loop_with_timeout(condition, timeout_secs): |
| 1078 deadline = time.time() + timeout_secs | 1079 deadline = time.time() + timeout_secs |
| 1079 while time.time() < deadline: | 1080 while time.time() < deadline: |
| 1080 if condition(): | 1081 if condition(): |
| 1081 return True | 1082 return True |
| 1082 return False | 1083 return False |
| 1083 | 1084 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 return command | 1292 return command |
| 1292 | 1293 |
| 1293 def _read_prompt(self, deadline): | 1294 def _read_prompt(self, deadline): |
| 1294 last_char = '' | 1295 last_char = '' |
| 1295 while True: | 1296 while True: |
| 1296 current_char = self._server_process.read_stdout(deadline, 1) | 1297 current_char = self._server_process.read_stdout(deadline, 1) |
| 1297 if current_char == ' ': | 1298 if current_char == ' ': |
| 1298 if last_char in ('#', '$'): | 1299 if last_char in ('#', '$'): |
| 1299 return | 1300 return |
| 1300 last_char = current_char | 1301 last_char = current_char |
| OLD | NEW |