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 from telemetry
.page
import page
as page_module
5 from telemetry
.page
import page_set
as page_set_module
8 class GpuRasterizationTestsPage(page_module
.Page
):
10 def __init__(self
, page_set
):
11 super(GpuRasterizationTestsPage
, self
).__init
__(
12 url
='file://../../data/gpu/pixel_background.html',
14 name
='GpuRasterization.BlueBox')
18 'color': [255, 255, 255],
22 'color': [255, 255, 255],
24 'location': [215, 5]},
26 'color': [255, 255, 255],
28 'location': [215, 215]},
30 'color': [255, 255, 255],
32 'location': [5, 215]},
33 {'comment': 'background-t',
36 'location': [30, 30]},
37 {'comment': 'background-r',
40 'location': [170, 30]},
41 {'comment': 'background-b',
44 'location': [170, 170]},
45 {'comment': 'background-l',
48 'location': [30, 170]},
52 'location': [70, 70]},
56 'location': [140, 70]},
60 'location': [140, 140]},
64 'location': [70, 140]}
66 self
.test_rect
= [0, 0, 220, 220]
68 def RunNavigateSteps(self
, action_runner
):
69 action_runner
.NavigateToPage(self
)
70 action_runner
.WaitForJavaScriptCondition(
71 'domAutomationController._finished', timeout_in_seconds
=30)
74 class GpuRasterizationTestsPageSet(page_set_module
.PageSet
):
76 """ Basic test cases for GPU rasterization. """
79 super(GpuRasterizationTestsPageSet
, self
).__init
__()
81 self
.AddPage(GpuRasterizationTestsPage(self
))