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

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: Corrected make_executable and is_executable locations 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..ed22c3ef3e83d8754e139b8f950785750d1c2ea9 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,12 @@ 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'
+ mock_files = {'foo': '', 'bar': ''}
+ mock_perms = {'foo': False, 'bar': False}
+ host.filesystem = MockFileSystem(files=mock_files, permissions=mock_perms)
+ host.filesystem.chmod(path, 444)
+ self.assertEquals(host.filesystem.permissions, {'bar': False, 'foo': True})
qyearsley 2016/06/15 21:54:25 Instead of a test for chmod, we would want to have

Powered by Google App Engine
This is Rietveld 408576698