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

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

Issue 2709103009: Fix specifier simplification and add test. (Closed)
Patch Set: Remove print statements, set MockPortFactory in mock_host method. Created 3 years, 10 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/factory_mock.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_mock.py
new file mode 100644
index 0000000000000000000000000000000000000000..911432fbc7780032f9075f5afb6371718c246b3e
--- /dev/null
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_mock.py
@@ -0,0 +1,18 @@
+# Copyright 2017 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from webkitpy.layout_tests.port.test import TestPort
+
+
+class MockPortFactory(object):
+
+ def __init__(self, host):
+ self._host = host
+
+ def get(self, port_name=None):
+ return TestPort(port_name=port_name, host=self._host)
+
+ def get_from_builder_name(self, builder_name):
+ port_name = self._host.builders.port_name_for_builder_name(builder_name)
+ return self.get(port_name)

Powered by Google App Engine
This is Rietveld 408576698