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

Side by Side Diff: content/test/gpu/gpu_tests/trace_test.py

Issue 2539973004: Update reference to page_test module to use legacy_page_test module (Closed)
Patch Set: update Created 4 years 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 (c) 2015 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2015 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 from gpu_tests import gpu_test_base 4 from gpu_tests import gpu_test_base
5 from gpu_tests import trace_test_expectations 5 from gpu_tests import trace_test_expectations
6 import page_sets 6 import page_sets
7 7
8 from telemetry.page import page_test 8 from telemetry.page import legacy_page_test
9 from telemetry.timeline import model as model_module 9 from telemetry.timeline import model as model_module
10 from telemetry.timeline import tracing_config 10 from telemetry.timeline import tracing_config
11 11
12 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel' 12 TOPLEVEL_GL_CATEGORY = 'gpu_toplevel'
13 TOPLEVEL_SERVICE_CATEGORY = 'disabled-by-default-gpu.service' 13 TOPLEVEL_SERVICE_CATEGORY = 'disabled-by-default-gpu.service'
14 TOPLEVEL_DEVICE_CATEGORY = 'disabled-by-default-gpu.device' 14 TOPLEVEL_DEVICE_CATEGORY = 'disabled-by-default-gpu.device'
15 TOPLEVEL_CATEGORIES = [TOPLEVEL_SERVICE_CATEGORY, TOPLEVEL_DEVICE_CATEGORY] 15 TOPLEVEL_CATEGORIES = [TOPLEVEL_SERVICE_CATEGORY, TOPLEVEL_DEVICE_CATEGORY]
16 16
17 test_harness_script = r""" 17 test_harness_script = r"""
18 var domAutomationController = {}; 18 var domAutomationController = {};
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 timeline_model = model_module.TimelineModel(timeline_data) 53 timeline_model = model_module.TimelineModel(timeline_data)
54 54
55 category_name = self.GetCategoryName() 55 category_name = self.GetCategoryName()
56 event_iter = timeline_model.IterAllEvents( 56 event_iter = timeline_model.IterAllEvents(
57 event_type_predicate=model_module.IsSliceOrAsyncSlice) 57 event_type_predicate=model_module.IsSliceOrAsyncSlice)
58 for event in event_iter: 58 for event in event_iter:
59 if (event.args.get('gl_category', None) == TOPLEVEL_GL_CATEGORY and 59 if (event.args.get('gl_category', None) == TOPLEVEL_GL_CATEGORY and
60 event.category == category_name): 60 event.category == category_name):
61 break 61 break
62 else: 62 else:
63 raise page_test.Failure(self._FormatException(category_name)) 63 raise legacy_page_test.Failure(self._FormatException(category_name))
64 64
65 def CustomizeBrowserOptions(self, options): 65 def CustomizeBrowserOptions(self, options):
66 options.AppendExtraBrowserArgs('--enable-logging') 66 options.AppendExtraBrowserArgs('--enable-logging')
67 options.AppendExtraBrowserArgs('--enable-experimental-canvas-features') 67 options.AppendExtraBrowserArgs('--enable-experimental-canvas-features')
68 68
69 def WillNavigateToPage(self, page, tab): 69 def WillNavigateToPage(self, page, tab):
70 config = tracing_config.TracingConfig() 70 config = tracing_config.TracingConfig()
71 config.chrome_trace_config.category_filter.AddExcludedCategory('*') 71 config.chrome_trace_config.category_filter.AddExcludedCategory('*')
72 for cat in TOPLEVEL_CATEGORIES: 72 for cat in TOPLEVEL_CATEGORIES:
73 config.chrome_trace_config.category_filter.AddDisabledByDefault( 73 config.chrome_trace_config.category_filter.AddDisabledByDefault(
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 """Tests GPU Device traces show up on devices that support it.""" 117 """Tests GPU Device traces show up on devices that support it."""
118 test = _DeviceTraceValidator 118 test = _DeviceTraceValidator
119 name = 'DeviceTraceTest' 119 name = 'DeviceTraceTest'
120 120
121 @classmethod 121 @classmethod
122 def Name(cls): 122 def Name(cls):
123 return 'device_trace_test' 123 return 'device_trace_test'
124 124
125 def _CreateExpectations(self): 125 def _CreateExpectations(self):
126 return trace_test_expectations.DeviceTraceTestExpectations() 126 return trace_test_expectations.DeviceTraceTestExpectations()
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/screenshot_sync.py ('k') | content/test/gpu/page_sets/gpu_process_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698