| 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 0dbf74d8a4ab3ff7d4007104bcd280c2085616e4..6b6e7c9f422f91384cdd33c5fac50ab0387471e3 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
|
| @@ -240,6 +240,7 @@ class MockFileSystem(object):
|
|
|
| def mkdtemp(self, **kwargs):
|
| class TemporaryDirectory(object):
|
| +
|
| def __init__(self, fs, **kwargs):
|
| self._kwargs = kwargs
|
| self._filesystem = fs
|
| @@ -351,7 +352,7 @@ class MockFileSystem(object):
|
| dot_dot = ''
|
| while not common_root == '':
|
| if path.startswith(common_root):
|
| - break
|
| + break
|
| common_root = self.dirname(common_root)
|
| dot_dot += '..' + self.sep
|
|
|
| @@ -415,6 +416,7 @@ class MockFileSystem(object):
|
|
|
|
|
| class WritableBinaryFileObject(object):
|
| +
|
| def __init__(self, fs, path):
|
| self.fs = fs
|
| self.path = path
|
| @@ -436,11 +438,13 @@ class WritableBinaryFileObject(object):
|
|
|
|
|
| class WritableTextFileObject(WritableBinaryFileObject):
|
| +
|
| def write(self, str):
|
| WritableBinaryFileObject.write(self, str.encode('utf-8'))
|
|
|
|
|
| class ReadableBinaryFileObject(object):
|
| +
|
| def __init__(self, fs, path, data):
|
| self.fs = fs
|
| self.path = path
|
| @@ -466,6 +470,7 @@ class ReadableBinaryFileObject(object):
|
|
|
|
|
| class ReadableTextFileObject(ReadableBinaryFileObject):
|
| +
|
| def __init__(self, fs, path, data):
|
| super(ReadableTextFileObject, self).__init__(fs, path, StringIO.StringIO(data.decode("utf-8")))
|
|
|
|
|