| 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)
|
|
|