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

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

Issue 2066963002: Add file permissions to filesystem_mock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
index 42d83c0a516dd38bc64e3c377de012bf2e1e7aa7..b098a7e667e810a6682d84ca7ccced3621835cf6 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
@@ -111,3 +111,14 @@ class MockFileSystemTest(unittest.TestCase, filesystem_unittest.GenericFileSyste
('foo/a', ['z'], ['x', 'y']),
('foo/a/z', [], ['lyrics']),
('foo/bar', [], ['quux', 'baz'])])
+
+ def test_chmod(self):
+ host = MockHost()
+ path = 'foo'
+ path2 = 'bar'
qyearsley 2016/06/14 21:47:02 It would be better to put these strings literals d
+ mock_files = {'foo': '',
+ 'bar': ''}
qyearsley 2016/06/14 21:47:02 Formatting nit: This fits on one line pretty easil
+ host.filesystem = MockFileSystem(files=mock_files)
+ host.filesystem.chmod(path, 444)
+ host.filesystem.chmod(path2, 343)
+ self.assertEquals(host.filesystem.perms, {'bar': '--wxr---wx', 'foo': '-r--r--r--'})

Powered by Google App Engine
This is Rietveld 408576698