Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / test / gpu / page_sets / gpu_process_tests.py
blob56b7319c5aa494e43ea4c12270cc54f964937d7d
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 GpuProcessTestsPage(page_module.Page):
10 def __init__(self, url, name, page_set):
11 super(GpuProcessTestsPage, self).__init__(url=url, page_set=page_set,
12 name=name)
13 self.user_agent_type = 'desktop'
15 def RunNavigateSteps(self, action_runner):
16 action_runner.NavigateToPage(self)
18 class FunctionalVideoPage(GpuProcessTestsPage):
20 def __init__(self, page_set):
21 super(FunctionalVideoPage, self).__init__(
22 url='file://../../data/gpu/functional_video.html',
23 name='GpuProcess.video',
24 page_set=page_set)
26 def RunNavigateSteps(self, action_runner):
27 action_runner.NavigateToPage(self)
28 action_runner.WaitForJavaScriptCondition(
29 'domAutomationController._finished', timeout_in_seconds=30)
32 class GpuProcessTestsPageSet(page_set_module.PageSet):
34 """ Tests that accelerated content triggers the creation of a GPU process """
36 def __init__(self):
37 super(GpuProcessTestsPageSet, self).__init__(
38 serving_dirs=set(['../../../../content/test/data']),
39 user_agent_type='desktop')
41 urls_and_names_list = [
42 ('file://../../data/gpu/functional_canvas_demo.html',
43 'GpuProcess.canvas2d'),
44 ('file://../../data/gpu/functional_3d_css.html',
45 'GpuProcess.css3d'),
46 ('file://../../data/gpu/functional_webgl.html',
47 'GpuProcess.webgl')
50 for url, name in urls_and_names_list:
51 self.AddPage(GpuProcessTestsPage(url, name, self))
53 self.AddPage(FunctionalVideoPage(self))