OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 4 |
5 import os | 5 import os |
6 import sys | 6 import sys |
7 | 7 |
8 from gpu_tests import gpu_integration_test | 8 from gpu_tests import gpu_integration_test |
9 from gpu_tests import path_util | 9 from gpu_tests import path_util |
10 from gpu_tests import pixel_test_pages | 10 from gpu_tests import pixel_test_pages |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 config.chrome_trace_config.category_filter.AddExcludedCategory('*') | 86 config.chrome_trace_config.category_filter.AddExcludedCategory('*') |
87 for cat in TOPLEVEL_CATEGORIES: | 87 for cat in TOPLEVEL_CATEGORIES: |
88 config.chrome_trace_config.category_filter.AddDisabledByDefault(cat) | 88 config.chrome_trace_config.category_filter.AddDisabledByDefault(cat) |
89 config.enable_chrome_trace = True | 89 config.enable_chrome_trace = True |
90 tab = self.tab | 90 tab = self.tab |
91 tab.browser.platform.tracing_controller.StartTracing(config, 60) | 91 tab.browser.platform.tracing_controller.StartTracing(config, 60) |
92 | 92 |
93 # Perform page navigation. | 93 # Perform page navigation. |
94 url = self.UrlOfStaticFilePath(test_path) | 94 url = self.UrlOfStaticFilePath(test_path) |
95 tab.Navigate(url, script_to_evaluate_on_commit=test_harness_script) | 95 tab.Navigate(url, script_to_evaluate_on_commit=test_harness_script) |
96 tab.action_runner.WaitForJavaScriptCondition2( | 96 tab.action_runner.WaitForJavaScriptCondition( |
97 'domAutomationController._finished', timeout=30) | 97 'domAutomationController._finished', timeout=30) |
98 | 98 |
99 # Stop tracing. | 99 # Stop tracing. |
100 timeline_data = tab.browser.platform.tracing_controller.StopTracing() | 100 timeline_data = tab.browser.platform.tracing_controller.StopTracing() |
101 | 101 |
102 # Evaluate success. | 102 # Evaluate success. |
103 timeline_model = model_module.TimelineModel(timeline_data) | 103 timeline_model = model_module.TimelineModel(timeline_data) |
104 category_name = args[0] | 104 category_name = args[0] |
105 event_iter = timeline_model.IterAllEvents( | 105 event_iter = timeline_model.IterAllEvents( |
106 event_type_predicate=model_module.IsSliceOrAsyncSlice) | 106 event_type_predicate=model_module.IsSliceOrAsyncSlice) |
(...skipping 17 matching lines...) Expand all Loading... |
124 super(cls, TraceIntegrationTest).SetUpProcess() | 124 super(cls, TraceIntegrationTest).SetUpProcess() |
125 path_util.SetupTelemetryPaths() | 125 path_util.SetupTelemetryPaths() |
126 cls.CustomizeOptions() | 126 cls.CustomizeOptions() |
127 cls.SetBrowserOptions(cls._finder_options) | 127 cls.SetBrowserOptions(cls._finder_options) |
128 cls.StartBrowser() | 128 cls.StartBrowser() |
129 cls.SetStaticServerDirs([data_path]) | 129 cls.SetStaticServerDirs([data_path]) |
130 | 130 |
131 def load_tests(loader, tests, pattern): | 131 def load_tests(loader, tests, pattern): |
132 del loader, tests, pattern # Unused. | 132 del loader, tests, pattern # Unused. |
133 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) | 133 return gpu_integration_test.LoadAllTestsInModule(sys.modules[__name__]) |
OLD | NEW |