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

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

Issue 1939843002: Replace webkitpy standalone builders functions with instantiable class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved builders out of port, updated comment Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
index bbe9eb50f9dd5c55554f0781b58d07ee2495a82c..ec00d0764a9e9426440ed2067670a58db9c71d40 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
@@ -32,14 +32,15 @@ from webkitpy.common.net.web_mock import MockWeb
from webkitpy.common.system.systemhost_mock import MockSystemHost
# New-style ports need to move down into webkitpy.common.
+from webkitpy.layout_tests.builders import Builders
from webkitpy.layout_tests.port.factory import PortFactory
from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem
class MockHost(MockSystemHost):
- def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True, web=None, scm=None):
- MockSystemHost.__init__(self, log_executive, executive_throws_when_run)
+ def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True, web=None, scm=None, os_name=None, os_version=None):
+ MockSystemHost.__init__(self, log_executive, executive_throws_when_run, os_name=os_name, os_version=os_version)
add_unit_tests_to_mock_filesystem(self.filesystem)
self.web = web or MockWeb()
@@ -54,6 +55,8 @@ class MockHost(MockSystemHost):
# on the list of known ports should override this with a MockPortFactory.
self.port_factory = PortFactory(self)
+ self.builders = Builders()
+
def initialize_scm(self, patch_directories=None):
if not self._scm:
self._scm = MockSCM(filesystem=self.filesystem, executive=self.executive)

Powered by Google App Engine
This is Rietveld 408576698