1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4 # pylint: disable=W0401,W0614
5 from telemetry.page.actions.all_page_actions import *
6 from telemetry.page import page as page_module
7 from telemetry.page import page_set as page_set_module
10 class GpuRasterizationTestsPage(page_module.Page):
12 def __init__(self, page_set):
13 super(GpuRasterizationTestsPage, self).__init__(
14 url='file://../../data/gpu/pixel_background.html',
16 name='GpuRasterization.BlueBox')
20 'color': [255, 255, 255],
24 'color': [255, 255, 255],
26 'location': [215, 5]},
28 'color': [255, 255, 255],
30 'location': [215, 215]},
32 'color': [255, 255, 255],
34 'location': [5, 215]},
35 {'comment': 'background-t',
38 'location': [30, 30]},
39 {'comment': 'background-r',
42 'location': [170, 30]},
43 {'comment': 'background-b',
46 'location': [170, 170]},
47 {'comment': 'background-l',
50 'location': [30, 170]},
54 'location': [70, 70]},
58 'location': [140, 70]},
62 'location': [140, 140]},
66 'location': [70, 140]}
68 self.test_rect = [0, 0, 220, 220]
70 def RunNavigateSteps(self, action_runner):
71 action_runner.NavigateToPage(self)
72 action_runner.WaitForJavaScriptCondition(
73 'domAutomationController._finished', timeout=30)
76 class GpuRasterizationTestsPageSet(page_set_module.PageSet):
78 """ Basic test cases for GPU rasterization. """
81 super(GpuRasterizationTestsPageSet, self).__init__()
83 self.AddPage(GpuRasterizationTestsPage(self))