| 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 self.stop() | 312 self.stop() |
| 313 self._driver_tempdir = self._port.host.filesystem.mkdtemp(prefix='%s-' %
self._port.driver_name()) | 313 self._driver_tempdir = self._port.host.filesystem.mkdtemp(prefix='%s-' %
self._port.driver_name()) |
| 314 server_name = self._port.driver_name() | 314 server_name = self._port.driver_name() |
| 315 environment = self._port.setup_environ_for_server() | 315 environment = self._port.setup_environ_for_server() |
| 316 environment = self._setup_environ_for_driver(environment) | 316 environment = self._setup_environ_for_driver(environment) |
| 317 self._crashed_process_name = None | 317 self._crashed_process_name = None |
| 318 self._crashed_pid = None | 318 self._crashed_pid = None |
| 319 self._leaked = False | 319 self._leaked = False |
| 320 self._leak_log = None | 320 self._leak_log = None |
| 321 cmd_line = self.cmd_line(pixel_tests, per_test_args) | 321 cmd_line = self.cmd_line(pixel_tests, per_test_args) |
| 322 self._server_process = self._port._server_process_constructor( | 322 self._server_process = self._port.server_process_constructor( |
| 323 self._port, server_name, cmd_line, environment, more_logging=self._p
ort.get_option("driver_logging")) | 323 self._port, server_name, cmd_line, environment, more_logging=self._p
ort.get_option("driver_logging")) |
| 324 self._server_process.start() | 324 self._server_process.start() |
| 325 self._current_cmd_line = cmd_line | 325 self._current_cmd_line = cmd_line |
| 326 | 326 |
| 327 if wait_for_ready: | 327 if wait_for_ready: |
| 328 deadline = time.time() + DRIVER_START_TIMEOUT_SECS | 328 deadline = time.time() + DRIVER_START_TIMEOUT_SECS |
| 329 if not self._wait_for_server_process_output(self._server_process, de
adline, '#READY'): | 329 if not self._wait_for_server_process_output(self._server_process, de
adline, '#READY'): |
| 330 _log.error("content_shell took too long to startup.") | 330 _log.error("content_shell took too long to startup.") |
| 331 | 331 |
| 332 def _wait_for_server_process_output(self, server_process, deadline, text): | 332 def _wait_for_server_process_output(self, server_process, deadline, text): |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 self.decoded_content = None | 546 self.decoded_content = None |
| 547 self.malloc = None | 547 self.malloc = None |
| 548 self.js_heap = None | 548 self.js_heap = None |
| 549 self.stdin_path = None | 549 self.stdin_path = None |
| 550 | 550 |
| 551 def decode_content(self): | 551 def decode_content(self): |
| 552 if self.encoding == 'base64' and self.content is not None: | 552 if self.encoding == 'base64' and self.content is not None: |
| 553 self.decoded_content = base64.b64decode(self.content) | 553 self.decoded_content = base64.b64decode(self.content) |
| 554 else: | 554 else: |
| 555 self.decoded_content = self.content | 555 self.decoded_content = self.content |
| OLD | NEW |