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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/webkit_finder.py

Issue 2849743003: webkitpy: Remove WebKitFinder.path_to_script() (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 # structure changes. 110 # structure changes.
111 def path_from_webkit_base(self, *comps): 111 def path_from_webkit_base(self, *comps):
112 return self._filesystem.join(self.webkit_base(), *comps) 112 return self._filesystem.join(self.webkit_base(), *comps)
113 113
114 def path_from_chromium_base(self, *comps): 114 def path_from_chromium_base(self, *comps):
115 return self._filesystem.join(self.chromium_base(), *comps) 115 return self._filesystem.join(self.chromium_base(), *comps)
116 116
117 def path_from_blink_source(self, *comps): 117 def path_from_blink_source(self, *comps):
118 return self._filesystem.join(self._filesystem.join(self.webkit_base(), ' Source'), *comps) 118 return self._filesystem.join(self._filesystem.join(self.webkit_base(), ' Source'), *comps)
119 119
120 def path_to_script(self, script_name):
121 """Returns the relative path to the script from the top of the WebKit tr ee."""
122 # This is intentionally relative in order to force callers to consider w hat
123 # their current working directory is (and change to the top of the tree if necessary).
124 return self._filesystem.join('Tools', 'Scripts', script_name)
125
126 def path_from_tools_scripts(self, *comps): 120 def path_from_tools_scripts(self, *comps):
127 return self._filesystem.join(self._filesystem.join(self.webkit_base(), ' Tools', 'Scripts'), *comps) 121 return self._filesystem.join(self._filesystem.join(self.webkit_base(), ' Tools', 'Scripts'), *comps)
128 122
129 def layout_tests_dir(self): 123 def layout_tests_dir(self):
130 return self.path_from_webkit_base('LayoutTests') 124 return self.path_from_webkit_base('LayoutTests')
131 125
132 def path_from_layout_tests(self, *comps): 126 def path_from_layout_tests(self, *comps):
133 return self._filesystem.join(self.layout_tests_dir(), *comps) 127 return self._filesystem.join(self.layout_tests_dir(), *comps)
134 128
135 def perf_tests_dir(self): 129 def perf_tests_dir(self):
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 prev_dir = '' 172 prev_dir = ''
179 current_dir = fs.dirname(self._webkit_base) 173 current_dir = fs.dirname(self._webkit_base)
180 while current_dir != prev_dir: 174 while current_dir != prev_dir:
181 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')): 175 if fs.exists(fs.join(current_dir, 'depot_tools', 'pylint.py')):
182 return fs.join(current_dir, 'depot_tools') 176 return fs.join(current_dir, 'depot_tools')
183 prev_dir = current_dir 177 prev_dir = current_dir
184 current_dir = fs.dirname(current_dir) 178 current_dir = fs.dirname(current_dir)
185 179
186 def path_from_depot_tools_base(self, *comps): 180 def path_from_depot_tools_base(self, *comps):
187 return self._filesystem.join(self.depot_tools_base(), *comps) 181 return self._filesystem.join(self.depot_tools_base(), *comps)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698