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

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

Issue 2143123004: Access environment variables through Host object instead of directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and updated after change for dummy home dir on linux. Created 4 years, 5 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/system/systemhost_mock.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost_mock.py
index d309d47fd7b2b249159657fa7f7d2f468bf51726..6457872977577ddc32e51d801af641d0dc7ba2df 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost_mock.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/systemhost_mock.py
@@ -28,7 +28,6 @@
from StringIO import StringIO
-from webkitpy.common.system.environment import Environment
from webkitpy.common.system.executive_mock import MockExecutive
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.platforminfo_mock import MockPlatformInfo
@@ -56,9 +55,10 @@ class MockSystemHost(object):
self.stdin = StringIO()
self.stdout = StringIO()
self.stderr = StringIO()
-
- def copy_current_environment(self):
- return Environment({"MOCK_ENVIRON_COPY": '1'})
+ self.environ = {
+ 'MOCK_ENVIRON_COPY': '1',
+ 'PATH': '/bin:/mock/bin'
+ }
def print_(self, *args, **kwargs):
sep = kwargs.get('sep', ' ')

Powered by Google App Engine
This is Rietveld 408576698