Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py

Issue 2014063002: Run format-webkit on webkitpy code (without string conversion). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2010 Google Inc. All rights reserved. 1 # Copyright (C) 2010 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 """Test/Dummy implementation of the driver interface.""" 572 """Test/Dummy implementation of the driver interface."""
573 next_pid = 1 573 next_pid = 1
574 574
575 def __init__(self, *args, **kwargs): 575 def __init__(self, *args, **kwargs):
576 super(TestDriver, self).__init__(*args, **kwargs) 576 super(TestDriver, self).__init__(*args, **kwargs)
577 self.started = False 577 self.started = False
578 self.pid = 0 578 self.pid = 0
579 579
580 def cmd_line(self, pixel_tests, per_test_args): 580 def cmd_line(self, pixel_tests, per_test_args):
581 pixel_tests_flag = '-p' if pixel_tests else '' 581 pixel_tests_flag = '-p' if pixel_tests else ''
582 return [self._port._path_to_driver()] + [pixel_tests_flag] + self._port. get_option('additional_driver_flag', []) + per_test_args 582 return [self._port._path_to_driver()] + [pixel_tests_flag] + \
583 self._port.get_option('additional_driver_flag', []) + per_test_args
583 584
584 def run_test(self, driver_input, stop_when_done): 585 def run_test(self, driver_input, stop_when_done):
585 if not self.started: 586 if not self.started:
586 self.started = True 587 self.started = True
587 self.pid = TestDriver.next_pid 588 self.pid = TestDriver.next_pid
588 TestDriver.next_pid += 1 589 TestDriver.next_pid += 1
589 590
590 start_time = time.time() 591 start_time = time.time()
591 test_name = driver_input.test_name 592 test_name = driver_input.test_name
592 test_args = driver_input.args or [] 593 test_args = driver_input.args or []
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 else: 659 else:
659 image = test.actual_image 660 image = test.actual_image
660 return DriverOutput(actual_text, image, test.actual_checksum, audio, 661 return DriverOutput(actual_text, image, test.actual_checksum, audio,
661 crash=(crash or web_process_crash), crashed_process_ name=crashed_process_name, 662 crash=(crash or web_process_crash), crashed_process_ name=crashed_process_name,
662 crashed_pid=crashed_pid, crash_log=crash_log, 663 crashed_pid=crashed_pid, crash_log=crash_log,
663 test_time=time.time() - start_time, timeout=test.tim eout, error=test.error, pid=self.pid, 664 test_time=time.time() - start_time, timeout=test.tim eout, error=test.error, pid=self.pid,
664 leak=test.leak) 665 leak=test.leak)
665 666
666 def stop(self): 667 def stop(self):
667 self.started = False 668 self.started = False
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698