Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: content/test/gpu/page_sets/gpu_process_tests.py

Issue 321563003: Add Wait* API to ActionRunner to wrap over WaitAction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing to head. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 GpuProcessTestsPage(page_module.Page): 10 class GpuProcessTestsPage(page_module.Page):
11 11
12 def __init__(self, url, name, page_set): 12 def __init__(self, url, name, page_set):
13 super(GpuProcessTestsPage, self).__init__(url=url, page_set=page_set, 13 super(GpuProcessTestsPage, self).__init__(url=url, page_set=page_set,
14 name=name) 14 name=name)
15 self.user_agent_type = 'desktop' 15 self.user_agent_type = 'desktop'
16 16
17 def RunNavigateSteps(self, action_runner): 17 def RunNavigateSteps(self, action_runner):
18 action_runner.NavigateToPage(self) 18 action_runner.NavigateToPage(self)
19 19
20 class FunctionalVideoPage(GpuProcessTestsPage): 20 class FunctionalVideoPage(GpuProcessTestsPage):
21 21
22 def __init__(self, page_set): 22 def __init__(self, page_set):
23 super(FunctionalVideoPage, self).__init__( 23 super(FunctionalVideoPage, self).__init__(
24 url='file://../../data/gpu/functional_video.html', 24 url='file://../../data/gpu/functional_video.html',
25 name='GpuProcess.video', 25 name='GpuProcess.video',
26 page_set=page_set) 26 page_set=page_set)
27 27
28 def RunNavigateSteps(self, action_runner): 28 def RunNavigateSteps(self, action_runner):
29 action_runner.NavigateToPage(self) 29 action_runner.NavigateToPage(self)
30 action_runner.RunAction(WaitAction( 30 action_runner.WaitForJavaScriptCondition(
31 { 31 'domAutomationController._finished', timeout=30)
32 'javascript': 'domAutomationController._finished',
33 'timeout': 30
34 }))
35 32
36 33
37 class GpuProcessTestsPageSet(page_set_module.PageSet): 34 class GpuProcessTestsPageSet(page_set_module.PageSet):
38 35
39 """ Tests that accelerated content triggers the creation of a GPU process """ 36 """ Tests that accelerated content triggers the creation of a GPU process """
40 37
41 def __init__(self): 38 def __init__(self):
42 super(GpuProcessTestsPageSet, self).__init__( 39 super(GpuProcessTestsPageSet, self).__init__(
43 serving_dirs=set(['../../../../content/test/data']), 40 serving_dirs=set(['../../../../content/test/data']),
44 user_agent_type='desktop') 41 user_agent_type='desktop')
45 42
46 urls_and_names_list = [ 43 urls_and_names_list = [
47 ('file://../../data/gpu/functional_canvas_demo.html', 44 ('file://../../data/gpu/functional_canvas_demo.html',
48 'GpuProcess.canvas2d'), 45 'GpuProcess.canvas2d'),
49 ('file://../../data/gpu/functional_3d_css.html', 46 ('file://../../data/gpu/functional_3d_css.html',
50 'GpuProcess.css3d'), 47 'GpuProcess.css3d'),
51 ('file://../../data/gpu/functional_webgl.html', 48 ('file://../../data/gpu/functional_webgl.html',
52 'GpuProcess.webgl') 49 'GpuProcess.webgl')
53 ] 50 ]
54 51
55 for url, name in urls_and_names_list: 52 for url, name in urls_and_names_list:
56 self.AddPage(GpuProcessTestsPage(url, name, self)) 53 self.AddPage(GpuProcessTestsPage(url, name, self))
57 54
58 self.AddPage(FunctionalVideoPage(self)) 55 self.AddPage(FunctionalVideoPage(self))
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_robustness.py ('k') | content/test/gpu/page_sets/gpu_rasterization_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698