コード例 #1
0
    def assert_port_works(self, port_name, input_name=None, platform=None):
        host = MockHost()
        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 = chromium_gpu.get(host,
                                    platform=platform,
                                    port_name=input_name,
                                    options=mock_options)
        else:
            port = chromium_gpu.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)
        if port_name.startswith('chromium-gpu-cg-mac'):
            path = 'fast/canvas/set-colors.html'
            self.assertTrue(
                port._filesystem.exists(port.abspath_for_test(path)))
            self.assertFalse(path in files)
コード例 #2
0
    def assertOverridesWorked(self, port_name):
        # test that we got the right port
        mock_options = mocktool.MockOptions(accelerated_compositing=None,
                                            accelerated_2d_canvas=None,
                                            builder_name='foo',
                                            use_drt=None,
                                            child_processes=None)
        port = chromium_gpu.get(port_name=port_name, options=mock_options)
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)
        self.assertTrue(port._options.use_drt)
        self.assertEqual(port.default_child_processes(), 1)
        self.assertEqual(port._options.builder_name, 'foo - GPU')

        # we use startswith() instead of Equal to gloss over platform versions.
        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 have the right expectations file.
        self.assertTrue('chromium-gpu' in
                        port.path_to_test_expectations_file())
コード例 #3
0
    def assertOverridesWorked(self, port_name, input_name=None, platform=None):
        # test that we got the right port
        mock_options = mocktool.MockOptions(accelerated_compositing=None,
                                            accelerated_2d_canvas=None,
                                            builder_name='foo',
                                            child_processes=None)
        if input_name and platform:
            port = chromium_gpu.get(platform=platform,
                                    port_name=input_name,
                                    options=mock_options)
        else:
            port = chromium_gpu.get(port_name=port_name, options=mock_options)
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)
        self.assertEqual(port.default_child_processes(), 1)
        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.
        files = port.tests(None)

        path = port.abspath_for_test('compositing/checkerboard.html')
        self.assertTrue(port._filesystem.exists(path))
        self.assertTrue(path in files)

        path = port.abspath_for_test('fast/html/keygen.html')
        self.assertTrue(port._filesystem.exists(path))
        self.assertFalse(path in files)
        if port_name.startswith('chromium-gpu-mac'):
            path = port.abspath_for_test('fast/canvas/set-colors.html')
            self.assertTrue(port._filesystem.exists(path))
            self.assertFalse(path in files)
コード例 #4
0
    def assert_port_works(self, port_name, input_name=None, platform=None):
        # test that we got the right port
        mock_options = mocktool.MockOptions(accelerated_compositing=None,
                                            accelerated_2d_canvas=None,
                                            builder_name='foo',
                                            child_processes=None)
        if input_name and platform:
            port = chromium_gpu.get(platform=platform, port_name=input_name,
                                    options=mock_options)
        else:
            port = chromium_gpu.get(port_name=port_name, options=mock_options)
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)
        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 = 'compositing/checkerboard.html'
        self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
        self.assertTrue(path in files)

        path = 'fast/html/keygen.html'
        self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
        self.assertFalse(path in files)
        if port_name.startswith('chromium-gpu-cg-mac'):
            path = 'fast/canvas/set-colors.html'
            self.assertTrue(port._filesystem.exists(port.abspath_for_test(path)))
            self.assertFalse(path in files)
コード例 #5
0
    def assertOverridesWorked(self, port_name, input_name=None, platform=None):
        # test that we got the right port
        mock_options = mocktool.MockOptions(
            accelerated_compositing=None, accelerated_2d_canvas=None, builder_name="foo", child_processes=None
        )
        if input_name and platform:
            port = chromium_gpu.get(platform=platform, port_name=input_name, options=mock_options)
        else:
            port = chromium_gpu.get(port_name=port_name, options=mock_options)
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)
        self.assertEqual(port.default_child_processes(), 1)
        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.
        files = port.tests(None)

        path = port.abspath_for_test("compositing/checkerboard.html")
        self.assertTrue(port._filesystem.exists(path))
        self.assertTrue(path in files)

        path = port.abspath_for_test("fast/html/keygen.html")
        self.assertTrue(port._filesystem.exists(path))
        self.assertFalse(path in files)
        if port_name.startswith("chromium-gpu-mac"):
            path = port.abspath_for_test("fast/canvas/set-colors.html")
            self.assertTrue(port._filesystem.exists(path))
            self.assertFalse(path in files)
コード例 #6
0
    def assertOverridesWorked(self, port_name):
        # test that we got the right port
        port = chromium_gpu.get(port_name=port_name, options=MockOptions())
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)

        # we use startswith() instead of Equal to gloss over platform versions.
        self.assertTrue(port.name().startswith(port_name))

        # test that it has the right directory in front of the search path.
        path = port.baseline_search_path()[0]
        self.assertEqual(port._webkit_baseline_path(port_name), path)

        # test that we have the right expectations file.
        self.assertTrue('chromium-gpu' in
                        port.path_to_test_expectations_file())
コード例 #7
0
    def assertOverridesWorked(self, port_name):
        # test that we got the right port
        mock_options = mocktool.MockOptions(accelerated_compositing=None,
                                            accelerated_2d_canvas=None,
                                            builder_name='foo',
                                            child_processes=None)
        port = chromium_gpu.get(port_name=port_name, options=mock_options)
        self.assertTrue(port._options.accelerated_compositing)
        self.assertTrue(port._options.accelerated_2d_canvas)
        self.assertEqual(port.default_child_processes(), 1)
        self.assertEqual(port._options.builder_name, 'foo - GPU')

        # we use startswith() instead of Equal to gloss over platform versions.
        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 have the right expectations file.
        self.assertTrue('chromium-gpu' in
                        port.path_to_test_expectations_file())

        # 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.
        files = port.tests(None)

        path = port.abspath_for_test('compositing/checkerboard.html')
        self.assertTrue(port._filesystem.exists(path))
        self.assertTrue(path in files)

        path = port.abspath_for_test('fast/html/keygen.html')
        self.assertTrue(port._filesystem.exists(path))
        self.assertFalse(path in files)
        if port_name.startswith('chromium-gpu-mac'):
            path = port.abspath_for_test('fast/canvas/set-colors.html')
            self.assertTrue(port._filesystem.exists(path))
            self.assertFalse(path in files)