Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / gpu / page_sets / pixel_tests.py
blobc0ed02a406a7779ae99d5afbe1c62ac7c2426c2a
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 PixelTestsPage(page_module.Page):
10 def __init__(self, url, name, test_rect, revision, page_set):
11 super(PixelTestsPage, self).__init__(url=url, page_set=page_set, name=name)
12 self.user_agent_type = 'desktop'
13 self.test_rect = test_rect
14 self.revision = revision
16 def RunNavigateSteps(self, action_runner):
17 action_runner.NavigateToPage(self)
18 action_runner.WaitForJavaScriptCondition(
19 'domAutomationController._finished', timeout_in_seconds=30)
22 class PixelTestsPageSet(page_set_module.PageSet):
24 """ Some basic test cases for GPU. """
26 def __init__(self):
27 super(PixelTestsPageSet, self).__init__(
28 user_agent_type='desktop')
29 self.AddPage(PixelTestsPage(
30 url='file://../../data/gpu/pixel_canvas2d.html',
31 name='Pixel.Canvas2DRedBox',
32 test_rect=[0, 0, 300, 300],
33 revision=4,
34 page_set=self))
36 self.AddPage(PixelTestsPage(
37 url='file://../../data/gpu/pixel_css3d.html',
38 name='Pixel.CSS3DBlueBox',
39 test_rect=[0, 0, 300, 300],
40 revision=9,
41 page_set=self))
43 self.AddPage(PixelTestsPage(
44 url='file://../../data/gpu/pixel_webgl.html',
45 name='Pixel.WebGLGreenTriangle',
46 test_rect=[0, 0, 300, 300],
47 revision=8,
48 page_set=self))