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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py

Issue 2399613002: Don't access Port._filesystem directly (use Port.host.filesystem instead). (Closed)
Patch Set: Created 4 years, 2 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/port/mock_drt.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
index 0341e32a797a15684ace625b483196f0546c2f5d..3ff69b4b40e524d973e9ab8737bd934d90932ef7 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
@@ -194,7 +194,7 @@ class MockDRT(object):
driver_input = self.input_from_line(line)
dirname, basename = self._port.split_test(driver_input.test_name)
is_reftest = (self._port.reference_files(driver_input.test_name) or
- self._port.is_reference_html_file(self._port._filesystem, dirname, basename))
+ self._port.is_reference_html_file(self._port.host.filesystem, dirname, basename))
output = self.output_for_test(driver_input, is_reftest)
self.write_test_output(driver_input, output, is_reftest)
@@ -241,18 +241,18 @@ class MockDRT(object):
actual_image = port.expected_image(test_input.test_name)
if self._options.actual_directory:
- actual_path = port._filesystem.join(self._options.actual_directory, test_input.test_name)
- root, _ = port._filesystem.splitext(actual_path)
+ actual_path = port.host.filesystem.join(self._options.actual_directory, test_input.test_name)
+ root, _ = port.host.filesystem.splitext(actual_path)
text_path = root + '-actual.txt'
- if port._filesystem.exists(text_path):
- actual_text = port._filesystem.read_binary_file(text_path)
+ if port.host.filesystem.exists(text_path):
+ actual_text = port.host.filesystem.read_binary_file(text_path)
audio_path = root + '-actual.wav'
- if port._filesystem.exists(audio_path):
- actual_audio = port._filesystem.read_binary_file(audio_path)
+ if port.host.filesystem.exists(audio_path):
+ actual_audio = port.host.filesystem.read_binary_file(audio_path)
image_path = root + '-actual.png'
- if port._filesystem.exists(image_path):
- actual_image = port._filesystem.read_binary_file(image_path)
- with port._filesystem.open_binary_file_for_reading(image_path) as filehandle:
+ if port.host.filesystem.exists(image_path):
+ actual_image = port.host.filesystem.read_binary_file(image_path)
+ with port.host.filesystem.open_binary_file_for_reading(image_path) as filehandle:
actual_checksum = read_checksum_from_png.read_checksum(filehandle)
return DriverOutput(actual_text, actual_image, actual_checksum, actual_audio)

Powered by Google App Engine
This is Rietveld 408576698