| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 # FIXME: We should probably remove _read_first_block and _read_optional_
image_block and | 125 # FIXME: We should probably remove _read_first_block and _read_optional_
image_block and |
| 126 # instead scope these locally in run_test. | 126 # instead scope these locally in run_test. |
| 127 self.error_from_test = str() | 127 self.error_from_test = str() |
| 128 self.err_seen_eof = False | 128 self.err_seen_eof = False |
| 129 self._server_process = None | 129 self._server_process = None |
| 130 self._current_cmd_line = None | 130 self._current_cmd_line = None |
| 131 | 131 |
| 132 self._measurements = {} | 132 self._measurements = {} |
| 133 if self._port.get_option("profile"): | 133 if self._port.get_option("profile"): |
| 134 profiler_name = self._port.get_option("profiler") | 134 profiler_name = self._port.get_option("profiler") |
| 135 self._profiler = ProfilerFactory.create_profiler(self._port.host, | 135 self._profiler = ProfilerFactory.create_profiler( |
| 136 self._port._path_to
_driver(), self._port.results_directory(), profiler_name) | 136 self._port.host, |
| 137 self._port._path_to_driver(), # pylint: disable=protected-acces
s |
| 138 self._port.results_directory(), |
| 139 profiler_name) |
| 137 else: | 140 else: |
| 138 self._profiler = None | 141 self._profiler = None |
| 139 | 142 |
| 140 def __del__(self): | 143 def __del__(self): |
| 141 self.stop() | 144 self.stop() |
| 142 | 145 |
| 143 def run_test(self, driver_input, stop_when_done): | 146 def run_test(self, driver_input, stop_when_done): |
| 144 """Run a single test and return the results. | 147 """Run a single test and return the results. |
| 145 | 148 |
| 146 Note that it is okay if a test times out or crashes. content_shell | 149 Note that it is okay if a test times out or crashes. content_shell |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 self.decoded_content = None | 544 self.decoded_content = None |
| 542 self.malloc = None | 545 self.malloc = None |
| 543 self.js_heap = None | 546 self.js_heap = None |
| 544 self.stdin_path = None | 547 self.stdin_path = None |
| 545 | 548 |
| 546 def decode_content(self): | 549 def decode_content(self): |
| 547 if self.encoding == 'base64' and self.content is not None: | 550 if self.encoding == 'base64' and self.content is not None: |
| 548 self.decoded_content = base64.b64decode(self.content) | 551 self.decoded_content = base64.b64decode(self.content) |
| 549 else: | 552 else: |
| 550 self.decoded_content = self.content | 553 self.decoded_content = self.content |
| OLD | NEW |