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

Side by Side Diff: sky/tools/webkitpy/common/system/filesystem_mock.py

Issue 639883003: Get test_webkitpy to actually run again. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: merge to ToT Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2009 Google Inc. All rights reserved. 1 # Copyright (C) 2009 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 def expanduser(self, path): 89 def expanduser(self, path):
90 if path[0] != "~": 90 if path[0] != "~":
91 return path 91 return path
92 parts = path.split(self.sep, 1) 92 parts = path.split(self.sep, 1)
93 home_directory = self.sep + "Users" + self.sep + "mock" 93 home_directory = self.sep + "Users" + self.sep + "mock"
94 if len(parts) == 1: 94 if len(parts) == 1:
95 return home_directory 95 return home_directory
96 return home_directory + self.sep + parts[1] 96 return home_directory + self.sep + parts[1]
97 97
98 def path_to_module(self, module_name): 98 def path_to_module(self, module_name):
99 return "/mock-checkout/third_party/WebKit/Tools/Scripts/" + module_name. replace('.', '/') + ".py" 99 return "/mock-checkout/third_party/WebKit/tools/" + module_name.replace( '.', '/') + ".py"
100 100
101 def chdir(self, path): 101 def chdir(self, path):
102 path = self.normpath(path) 102 path = self.normpath(path)
103 if not self.isdir(path): 103 if not self.isdir(path):
104 raise OSError(errno.ENOENT, path, os.strerror(errno.ENOENT)) 104 raise OSError(errno.ENOENT, path, os.strerror(errno.ENOENT))
105 self.cwd = path 105 self.cwd = path
106 106
107 def copyfile(self, source, destination): 107 def copyfile(self, source, destination):
108 if not self.exists(source): 108 if not self.exists(source):
109 self._raise_not_found(source) 109 self._raise_not_found(source)
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 return self.data.readline(length) 480 return self.data.readline(length)
481 481
482 def __iter__(self): 482 def __iter__(self):
483 return self.data.__iter__() 483 return self.data.__iter__()
484 484
485 def next(self): 485 def next(self):
486 return self.data.next() 486 return self.data.next()
487 487
488 def seek(self, offset, whence=os.SEEK_SET): 488 def seek(self, offset, whence=os.SEEK_SET):
489 self.data.seek(offset, whence) 489 self.data.seek(offset, whence)
OLDNEW
« no previous file with comments | « sky/tools/webkitpy/common/system/executive_unittest.py ('k') | sky/tools/webkitpy/common/system/logutils_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698