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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py

Issue 2453513002: Change default behavior of --seed to be unix timestamp (Closed)
Patch Set: Address CL feedback from dpranke Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 23 matching lines...) Expand all
34 34
35 # New-style ports need to move down into webkitpy.common. 35 # New-style ports need to move down into webkitpy.common.
36 from webkitpy.layout_tests.builder_list import BuilderList 36 from webkitpy.layout_tests.builder_list import BuilderList
37 from webkitpy.layout_tests.port.factory import PortFactory 37 from webkitpy.layout_tests.port.factory import PortFactory
38 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem 38 from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem
39 39
40 40
41 class MockHost(MockSystemHost): 41 class MockHost(MockSystemHost):
42 42
43 def __init__(self, log_executive=False, executive_throws_when_run=None, 43 def __init__(self, log_executive=False, executive_throws_when_run=None,
44 initialize_scm_by_default=True, web=None, scm=None, os_name=Non e, os_version=None): 44 initialize_scm_by_default=True, web=None, scm=None, os_name=Non e, os_version=None,
45 MockSystemHost.__init__(self, log_executive, executive_throws_when_run, os_name=os_name, os_version=os_version) 45 time_return_val=123):
46
47 MockSystemHost.__init__(self, log_executive, executive_throws_when_run, os_name=os_name,
48 os_version=os_version, time_return_val=time_retu rn_val)
49
46 add_unit_tests_to_mock_filesystem(self.filesystem) 50 add_unit_tests_to_mock_filesystem(self.filesystem)
47 self.web = web or MockWeb() 51 self.web = web or MockWeb()
48 52
49 self._scm = scm 53 self._scm = scm
50 # FIXME: we should never initialize the SCM by default, since the real 54 # FIXME: we should never initialize the SCM by default, since the real
51 # object doesn't either. This has caused at least one bug (see bug 89498 ). 55 # object doesn't either. This has caused at least one bug (see bug 89498 ).
52 if initialize_scm_by_default: 56 if initialize_scm_by_default:
53 self.initialize_scm() 57 self.initialize_scm()
54 self.buildbot = MockBuildBot() 58 self.buildbot = MockBuildBot()
55 59
(...skipping 10 matching lines...) Expand all
66 # Making the checkout_root exist in the mock filesystem makes that chdir not raise. 70 # Making the checkout_root exist in the mock filesystem makes that chdir not raise.
67 self.filesystem.maybe_make_directory(self._scm.checkout_root) 71 self.filesystem.maybe_make_directory(self._scm.checkout_root)
68 72
69 def scm(self): 73 def scm(self):
70 return self._scm 74 return self._scm
71 75
72 def scm_for_path(self, path): 76 def scm_for_path(self, path):
73 # FIXME: consider supporting more than one SCM so that we can do more co mprehensive testing. 77 # FIXME: consider supporting more than one SCM so that we can do more co mprehensive testing.
74 self.initialize_scm() 78 self.initialize_scm()
75 return self._scm 79 return self._scm
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698