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

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

Issue 2029823002: Fix MockFileSystem.walk and add test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: set dry_run to False 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6b6e7c9f422f91384cdd33c5fac50ab0387471e3..44c7d8043d507f9dad2c683232b2e28ea01e5dd7 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
@@ -223,7 +223,12 @@ class MockFileSystem(object):
dirs.append(dir)
else:
files.append(remaining)
- return [(top[:-1], dirs, files)]
+ file_system_tuples = [(top[:-1], dirs, files)]
+ for dir in dirs:
+ dir = top + dir
+ tuples_from_subdirs = self.walk(dir)
+ file_system_tuples += tuples_from_subdirs
+ return file_system_tuples
def mtime(self, path):
if self.exists(path):
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698