本文整理汇总了Python中webkitpy.layout_tests.port.factory.PortFactory._webkit_baseline_path方法的典型用法代码示例。如果您正苦于以下问题:Python PortFactory._webkit_baseline_path方法的具体用法?Python PortFactory._webkit_baseline_path怎么用?Python PortFactory._webkit_baseline_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类webkitpy.layout_tests.port.factory.PortFactory
的用法示例。
在下文中一共展示了PortFactory._webkit_baseline_path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: assert_port_works
# 需要导入模块: from webkitpy.layout_tests.port.factory import PortFactory [as 别名]
# 或者: from webkitpy.layout_tests.port.factory.PortFactory import _webkit_baseline_path [as 别名]
def assert_port_works(self, port_name, input_name=None, platform=None):
host = MockSystemHost()
host.filesystem = FileSystem() # FIXME: This test should not use a real filesystem!
# test that we got the right port
mock_options = MockOptions(accelerated_2d_canvas=None,
accelerated_video=None,
builder_name='foo',
child_processes=None)
if input_name and platform:
port = PortFactory(host).get(host, platform=platform, port_name=input_name, options=mock_options)
else:
port = PortFactory(host).get(host, port_name=port_name, options=mock_options)
self.assertTrue(port._options.accelerated_2d_canvas)
self.assertTrue(port._options.accelerated_video)
self.assertTrue(port._options.experimental_fully_parallel)
self.assertEqual(port._options.builder_name, 'foo - GPU')
self.assertTrue(port.name().startswith(port_name))
# test that it has the right directories in front of the search path.
paths = port.baseline_search_path()
self.assertEqual(port._webkit_baseline_path(port_name), paths[0])
if port_name == 'chromium-gpu-linux':
self.assertEqual(port._webkit_baseline_path('chromium-gpu-win'), paths[1])
self.assertEqual(port._webkit_baseline_path('chromium-gpu'), paths[2])
else:
self.assertEqual(port._webkit_baseline_path('chromium-gpu'), paths[1])
# Test that we're limiting to the correct directories.
# These two tests are picked mostly at random, but we make sure they
# exist separately from being filtered out by the port.
# Note that this is using a real filesystem.
files = port.tests(None)
path = 'fast/html/keygen.html'
self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
self.assertFalse(path in files)
示例2: _assert_baseline_path
# 需要导入模块: from webkitpy.layout_tests.port.factory import PortFactory [as 别名]
# 或者: from webkitpy.layout_tests.port.factory.PortFactory import _webkit_baseline_path [as 别名]
def _assert_baseline_path(self, port_name, baseline_path):
port = PortFactory(MockSystemHost()).get(port_name)
self.assertEquals(port.name(), port_name)
self.assertEquals(port.baseline_path(), port._webkit_baseline_path(baseline_path))