Content settings: remove some plugin-related code/resources when... there are no...
[chromium-blink-merge.git] / content / test / gpu / page_sets / pixel_tests.py
blob8dccf2aad60ef7abe278dbfdf88094052af9e8a7
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 expected_colors=None):
12 super(PixelTestsPage, self).__init__(url=url, page_set=story_set, name=name,
13 expectations=expectations)
14 self.test_rect = test_rect
15 self.revision = revision
16 if expected_colors:
17 self.expected_colors = expected_colors
19 def RunNavigateStepsInner(self, action_runner):
20 action_runner.WaitForJavaScriptCondition(
21 'domAutomationController._finished', timeout_in_seconds=30)
24 class PixelTestsStorySet(story_set_module.StorySet):
26 """ Some basic test cases for GPU. """
28 def __init__(self, expectations, base_name='Pixel'):
29 super(PixelTestsStorySet, self).__init__()
30 self.AddStory(PixelTestsPage(
31 url='file://../../data/gpu/pixel_canvas2d.html',
32 name=base_name + '.Canvas2DRedBox',
33 test_rect=[0, 0, 300, 300],
34 revision=7,
35 story_set=self,
36 expectations=expectations))
38 self.AddStory(PixelTestsPage(
39 url='file://../../data/gpu/pixel_css3d.html',
40 name=base_name + '.CSS3DBlueBox',
41 test_rect=[0, 0, 300, 300],
42 revision=15,
43 story_set=self,
44 expectations=expectations))
46 self.AddStory(PixelTestsPage(
47 url='file://../../data/gpu/pixel_webgl.html',
48 name=base_name + '.WebGLGreenTriangle',
49 test_rect=[0, 0, 300, 300],
50 revision=12,
51 story_set=self,
52 expectations=expectations))
54 self.AddStory(PixelTestsPage(
55 url='file://../../data/gpu/pixel_scissor.html',
56 name=base_name + '.ScissorTestWithPreserveDrawingBuffer',
57 test_rect=[0, 0, 300, 300],
58 revision=0, # This is not used.
59 story_set=self,
60 expectations=expectations,
61 expected_colors='../../data/gpu/pixel_scissor_expectations.json'))