Index: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py |
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py |
index 44c7d8043d507f9dad2c683232b2e28ea01e5dd7..fc1e1c22e665b8ca9de0f39526b624b8d4556cf5 100644 |
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py |
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py |
@@ -49,6 +49,7 @@ class MockFileSystem(object): |
not exist. |
""" |
self.files = files or {} |
+ self.executable_files = set() |
self.written_files = {} |
self.last_tmpdir = None |
self.current_tmpno = 0 |
@@ -60,7 +61,6 @@ class MockFileSystem(object): |
while not d in self.dirs: |
self.dirs.add(d) |
d = self.dirname(d) |
- |
def clear_written_files(self): |
# This function can be used to track what is written between steps in a test. |
self.written_files = {} |
@@ -75,6 +75,13 @@ class MockFileSystem(object): |
return path.rsplit(self.sep, 1) |
return ('', path) |
+ def is_executable(self, file_path): |
+ return file_path in self.executable_files |
+ |
+ def make_executable(self, orig_path, new_path): |
+ if self.is_executable(orig_path): |
+ self.executable_files.add(new_path) |
+ |
def abspath(self, path): |
if os.path.isabs(path): |
return self.normpath(path) |