| 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 return True | 249 return True |
| 250 return False | 250 return False |
| 251 | 251 |
| 252 def start(self, pixel_tests, per_test_args): | 252 def start(self, pixel_tests, per_test_args): |
| 253 new_cmd_line = self.cmd_line(pixel_tests, per_test_args) | 253 new_cmd_line = self.cmd_line(pixel_tests, per_test_args) |
| 254 if not self._server_process or new_cmd_line != self._current_cmd_line: | 254 if not self._server_process or new_cmd_line != self._current_cmd_line: |
| 255 self._start(pixel_tests, per_test_args) | 255 self._start(pixel_tests, per_test_args) |
| 256 self._run_post_start_tasks() | 256 self._run_post_start_tasks() |
| 257 | 257 |
| 258 def _setup_environ_for_driver(self, environment): | 258 def _setup_environ_for_driver(self, environment): |
| 259 environment['DYLD_LIBRARY_PATH'] = self._port._build_path() | |
| 260 environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path() | |
| 261 environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir() | |
| 262 if 'WEBKITOUTPUTDIR' in os.environ: | |
| 263 environment['WEBKITOUTPUTDIR'] = os.environ['WEBKITOUTPUTDIR'] | |
| 264 if self._profiler: | 259 if self._profiler: |
| 265 environment = self._profiler.adjusted_environment(environment) | 260 environment = self._profiler.adjusted_environment(environment) |
| 266 return environment | 261 return environment |
| 267 | 262 |
| 268 def _start(self, pixel_tests, per_test_args): | 263 def _start(self, pixel_tests, per_test_args): |
| 269 self.stop() | 264 self.stop() |
| 270 self._driver_tempdir = self._port._filesystem.mkdtemp(prefix='%s-' % sel
f._port.driver_name()) | 265 self._driver_tempdir = self._port._filesystem.mkdtemp(prefix='%s-' % sel
f._port.driver_name()) |
| 271 server_name = self._port.driver_name() | 266 server_name = self._port.driver_name() |
| 272 environment = self._port.setup_environ_for_server(server_name) | 267 environment = self._port.setup_environ_for_server(server_name) |
| 273 environment = self._setup_environ_for_driver(environment) | 268 environment = self._setup_environ_for_driver(environment) |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 self.content = str() # FIXME: Should be bytearray() once we require Pyt
hon 2.6. | 456 self.content = str() # FIXME: Should be bytearray() once we require Pyt
hon 2.6. |
| 462 self.decoded_content = None | 457 self.decoded_content = None |
| 463 self.malloc = None | 458 self.malloc = None |
| 464 self.js_heap = None | 459 self.js_heap = None |
| 465 | 460 |
| 466 def decode_content(self): | 461 def decode_content(self): |
| 467 if self.encoding == 'base64' and self.content is not None: | 462 if self.encoding == 'base64' and self.content is not None: |
| 468 self.decoded_content = base64.b64decode(self.content) | 463 self.decoded_content = base64.b64decode(self.content) |
| 469 else: | 464 else: |
| 470 self.decoded_content = self.content | 465 self.decoded_content = self.content |
| OLD | NEW |