Refactored TestExpectations out of Telemetry and into content/test/gpu.
[chromium-blink-merge.git] / content / test / gpu / page_sets / pixel_tests.py
blob8b578d55544a8ef1b023e204e3cf277a4d4a3c3d
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.story import story_set as story_set_module
6 from gpu_tests import gpu_test_base
8 class PixelTestsPage(gpu_test_base.PageBase):
10 def __init__(self, url, name, test_rect, revision, story_set, expectations):
11 super(PixelTestsPage, self).__init__(url=url, page_set=story_set, name=name,
12 expectations=expectations)
13 self.test_rect = test_rect
14 self.revision = revision
16 def RunNavigateStepsInner(self, action_runner):
17 action_runner.WaitForJavaScriptCondition(
18 'domAutomationController._finished', timeout_in_seconds=30)
21 class PixelTestsStorySet(story_set_module.StorySet):
23 """ Some basic test cases for GPU. """
25 def __init__(self, expectations, base_name='Pixel'):
26 super(PixelTestsStorySet, self).__init__()
27 self.AddStory(PixelTestsPage(
28 url='file://../../data/gpu/pixel_canvas2d.html',
29 name=base_name + '.Canvas2DRedBox',
30 test_rect=[0, 0, 300, 300],
31 revision=5,
32 story_set=self,
33 expectations=expectations))
35 self.AddStory(PixelTestsPage(
36 url='file://../../data/gpu/pixel_css3d.html',
37 name=base_name + '.CSS3DBlueBox',
38 test_rect=[0, 0, 300, 300],
39 revision=13,
40 story_set=self,
41 expectations=expectations))
43 self.AddStory(PixelTestsPage(
44 url='file://../../data/gpu/pixel_webgl.html',
45 name=base_name + '.WebGLGreenTriangle',
46 test_rect=[0, 0, 300, 300],
47 revision=10,
48 story_set=self,
49 expectations=expectations))