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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.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) 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 22 matching lines...) Expand all
33 from webkitpy.common.system.systemhost_mock import MockSystemHost 33 from webkitpy.common.system.systemhost_mock import MockSystemHost
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, init ialize_scm_by_default=True, web=None, scm=None, os_name=None, os_version=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 MockSystemHost.__init__(self, log_executive, executive_throws_when_run, os_name=os_name, os_version=os_version) 45 MockSystemHost.__init__(self, log_executive, executive_throws_when_run, os_name=os_name, os_version=os_version)
45 add_unit_tests_to_mock_filesystem(self.filesystem) 46 add_unit_tests_to_mock_filesystem(self.filesystem)
46 self.web = web or MockWeb() 47 self.web = web or MockWeb()
47 48
48 self._scm = scm 49 self._scm = scm
49 # FIXME: we should never initialize the SCM by default, since the real 50 # FIXME: we should never initialize the SCM by default, since the real
50 # object doesn't either. This has caused at least one bug (see bug 89498 ). 51 # object doesn't either. This has caused at least one bug (see bug 89498 ).
51 if initialize_scm_by_default: 52 if initialize_scm_by_default:
52 self.initialize_scm() 53 self.initialize_scm()
53 self.buildbot = MockBuildBot() 54 self.buildbot = MockBuildBot()
(...skipping 14 matching lines...) Expand all
68 def scm(self): 69 def scm(self):
69 return self._scm 70 return self._scm
70 71
71 def scm_for_path(self, path): 72 def scm_for_path(self, path):
72 # FIXME: consider supporting more than one SCM so that we can do more co mprehensive testing. 73 # FIXME: consider supporting more than one SCM so that we can do more co mprehensive testing.
73 self.initialize_scm() 74 self.initialize_scm()
74 return self._scm 75 return self._scm
75 76
76 def checkout(self): 77 def checkout(self):
77 return self._checkout 78 return self._checkout
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698