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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py

Issue 2831883002: webkitpy: Reduce usage of path_from_webkit_base(). (Closed)
Patch Set: . Created 3 years, 8 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/layout_tests/models/test_expectations.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index f679d17c8f4a1c7fbffbb7740b4d43ad5328dc7b..62c523a3cbf96eb6eb5af9254e5f2f702d3830d3 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -33,6 +33,7 @@ from collections import defaultdict
import logging
import re
+from webkitpy.common.webkit_finder import WebKitFinder
from webkitpy.layout_tests.models.test_configuration import TestConfigurationConverter
_log = logging.getLogger(__name__)
@@ -1095,8 +1096,10 @@ class TestExpectations(object):
return REBASELINE in self._model.get_expectations(test)
def _shorten_filename(self, filename):
- if filename.startswith(self._port.path_from_webkit_base()):
- return self._port.host.filesystem.relpath(filename, self._port.path_from_webkit_base())
+ finder = WebKitFinder(self._port.host.filesystem)
+ # TODO(tkent): Can we use path_from_layout_tests() instead?
+ if filename.startswith(finder.path_from_webkit_base()):
+ return self._port.host.filesystem.relpath(filename, finder.path_from_webkit_base())
return filename
def _report_warnings(self):

Powered by Google App Engine
This is Rietveld 408576698