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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.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/models/test_expectations_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index 2bc9cd994435fae57b4a4f48fabd7d63435b65e1..b215cf407bfbc5297e6f8e27d38a5b133df4c049 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -362,9 +362,11 @@ Bug(test) failures/expected/timeout.html [ Timeout ]
self.parse_exp("Bug(x) failures/expected [ Skip ]\n"
"Bug(x) failures/expected/text.html [ Failure ]\n")
self.assert_exp('failures/expected/text.html', FAIL)
- self.assertFalse(self._port._filesystem.join(self._port.layout_tests_dir(),
- 'failures/expected/text.html') in
- self._exp.get_tests_with_result_type(SKIP))
+ self.assertNotIn(
+ self._port.host.filesystem.join(
+ self._port.layout_tests_dir(),
+ 'failures/expected/text.html'),
+ self._exp.get_tests_with_result_type(SKIP))
def test_bot_test_expectations(self):
"""Test that expectations are merged rather than overridden when using flaky option 'unexpected'."""
@@ -393,7 +395,10 @@ class SkippedTests(Base):
def check(self, expectations, overrides, skips, lint=False, expected_results=[WONTFIX, SKIP, FAIL]):
port = MockHost().port_factory.get('test-win-win7')
- port._filesystem.write_text_file(port._filesystem.join(port.layout_tests_dir(), 'failures/expected/text.html'), 'foo')
+ port.host.filesystem.write_text_file(
+ port.host.filesystem.join(
+ port.layout_tests_dir(), 'failures/expected/text.html'),
+ 'foo')
expectations_dict = OrderedDict()
expectations_dict['expectations'] = expectations
if overrides:

Powered by Google App Engine
This is Rietveld 408576698