OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 # pylint: disable=W0401,W0614 | 4 # pylint: disable=W0401,W0614 |
5 from telemetry.page.actions.all_page_actions import * | 5 from telemetry.page.actions.all_page_actions import * |
6 from telemetry.page import page as page_module | 6 from telemetry.page import page as page_module |
7 from telemetry.page import page_set as page_set_module | 7 from telemetry.page import page_set as page_set_module |
8 | 8 |
9 | 9 |
10 class GpuRasterizationTestsPage(page_module.Page): | 10 class GpuRasterizationTestsPage(page_module.Page): |
11 | 11 |
12 def __init__(self, page_set): | 12 def __init__(self, page_set): |
13 super(GpuRasterizationTestsPage, self).__init__( | 13 super(GpuRasterizationTestsPage, self).__init__( |
14 url='file://../../data/gpu/pixel_css3d.html', | 14 url='file://../../data/gpu/pixel_background.html', |
Ken Russell (switch to Gerrit)
2014/06/02 23:20:14
I'd suggest "pixel_blue_box.html" as a more descri
alokp
2014/06/02 23:44:04
The naming convention used in data/gpu directory s
| |
15 page_set=page_set, | 15 page_set=page_set, |
16 name='GpuRasterization.CSS3DBlueBox') | 16 name='GpuRasterization.BlueBox') |
17 | 17 |
18 self.user_agent_type = 'desktop' | |
19 self.expectations = [ | 18 self.expectations = [ |
20 {'comment': 'body-t', | 19 {'comment': 'body-t', |
21 'color': [255, 255, 255], | 20 'color': [255, 255, 255], |
22 'tolerance': 0, | 21 'tolerance': 0, |
23 'location': [5, 5]}, | 22 'location': [5, 5]}, |
24 {'comment': 'body-r', | 23 {'comment': 'body-r', |
25 'color': [255, 255, 255], | 24 'color': [255, 255, 255], |
26 'tolerance': 0, | 25 'tolerance': 0, |
27 'location': [245, 5]}, | 26 'location': [215, 5]}, |
28 {'comment': 'body-b', | 27 {'comment': 'body-b', |
29 'color': [255, 255, 255], | 28 'color': [255, 255, 255], |
30 'tolerance': 0, | 29 'tolerance': 0, |
31 'location': [245, 245]}, | 30 'location': [215, 215]}, |
32 {'comment': 'body-l', | 31 {'comment': 'body-l', |
33 'color': [255, 255, 255], | 32 'color': [255, 255, 255], |
34 'tolerance': 0, | 33 'tolerance': 0, |
35 'location': [5, 245]}, | 34 'location': [5, 215]}, |
36 {'comment': 'background-t', | 35 {'comment': 'background-t', |
37 'color': [0, 0, 0], | 36 'color': [0, 0, 0], |
38 'tolerance': 0, | 37 'tolerance': 0, |
39 'location': [30, 30]}, | 38 'location': [30, 30]}, |
40 {'comment': 'background-r', | 39 {'comment': 'background-r', |
41 'color': [0, 0, 0], | 40 'color': [0, 0, 0], |
42 'tolerance': 0, | 41 'tolerance': 0, |
43 'location': [170, 30]}, | 42 'location': [170, 30]}, |
44 {'comment': 'background-b', | 43 {'comment': 'background-b', |
45 'color': [0, 0, 0], | 44 'color': [0, 0, 0], |
46 'tolerance': 0, | 45 'tolerance': 0, |
47 'location': [170, 170]}, | 46 'location': [170, 170]}, |
48 {'comment': 'background-l', | 47 {'comment': 'background-l', |
49 'color': [0, 0, 0], | 48 'color': [0, 0, 0], |
50 'tolerance': 0, | 49 'tolerance': 0, |
51 'location': [30, 170]}, | 50 'location': [30, 170]}, |
52 {'comment': 'box-t', | 51 {'comment': 'box-t', |
53 'color': [0, 0, 255], | 52 'color': [0, 0, 255], |
54 'tolerance': 0, | 53 'tolerance': 0, |
55 'location': [70, 70]}, | 54 'location': [70, 70]}, |
56 {'comment': 'box-r', | 55 {'comment': 'box-r', |
57 'color': [0, 0, 255], | 56 'color': [0, 0, 255], |
58 'tolerance': 0, | 57 'tolerance': 0, |
59 'location': [140, 70]}, | 58 'location': [140, 70]}, |
60 {'comment': 'box-b', | 59 {'comment': 'box-b', |
61 'color': [0, 0, 255], | 60 'color': [0, 0, 255], |
62 'tolerance': 0, | 61 'tolerance': 0, |
63 'location': [140, 120]}, | 62 'location': [140, 140]}, |
64 {'comment': 'box-l', | 63 {'comment': 'box-l', |
65 'color': [0, 0, 255], | 64 'color': [0, 0, 255], |
66 'tolerance': 0, | 65 'tolerance': 0, |
67 'location': [70, 120]} | 66 'location': [70, 140]} |
68 ] | 67 ] |
69 self.test_rect = [0, 0, 250, 250] | 68 self.test_rect = [0, 0, 220, 220] |
70 | 69 |
71 def RunNavigateSteps(self, action_runner): | 70 def RunNavigateSteps(self, action_runner): |
72 action_runner.NavigateToPage(self) | 71 action_runner.NavigateToPage(self) |
73 action_runner.RunAction(WaitAction( | 72 action_runner.RunAction(WaitAction( |
74 { | 73 { |
75 'javascript': 'domAutomationController._finished', | 74 'javascript': 'domAutomationController._finished', |
76 'timeout': 30 | 75 'timeout': 30 |
77 })) | 76 })) |
78 | 77 |
79 | 78 |
80 class GpuRasterizationTestsPageSet(page_set_module.PageSet): | 79 class GpuRasterizationTestsPageSet(page_set_module.PageSet): |
81 | 80 |
82 """ Basic test cases for GPU rasterization. """ | 81 """ Basic test cases for GPU rasterization. """ |
83 | 82 |
84 def __init__(self): | 83 def __init__(self): |
85 super(GpuRasterizationTestsPageSet, self).__init__( | 84 super(GpuRasterizationTestsPageSet, self).__init__() |
86 user_agent_type='desktop') | |
87 | 85 |
88 self.AddPage(GpuRasterizationTestsPage(self)) | 86 self.AddPage(GpuRasterizationTestsPage(self)) |
OLD | NEW |