OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 | 6 |
7 from core import path_util | 7 from core import path_util |
8 from core import perf_benchmark | 8 from core import perf_benchmark |
9 | 9 |
10 from telemetry import benchmark | 10 from telemetry import benchmark |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 self._blink_perf_js = f.read() | 83 self._blink_perf_js = f.read() |
84 | 84 |
85 def WillNavigateToPage(self, page, tab): | 85 def WillNavigateToPage(self, page, tab): |
86 del tab # unused | 86 del tab # unused |
87 page.script_to_evaluate_on_commit = self._blink_perf_js | 87 page.script_to_evaluate_on_commit = self._blink_perf_js |
88 | 88 |
89 def CustomizeBrowserOptions(self, options): | 89 def CustomizeBrowserOptions(self, options): |
90 options.AppendExtraBrowserArgs([ | 90 options.AppendExtraBrowserArgs([ |
91 '--js-flags=--expose_gc', | 91 '--js-flags=--expose_gc', |
92 '--enable-experimental-web-platform-features', | 92 '--enable-experimental-web-platform-features', |
93 '--ignore-autoplay-restrictions', | 93 '--disable-gesture-requirement-for-media-playback', |
94 '--enable-experimental-canvas-features', | 94 '--enable-experimental-canvas-features', |
95 # TODO(qinmin): After fixing crbug.com/592017, remove this command line. | 95 # TODO(qinmin): After fixing crbug.com/592017, remove this command line. |
96 '--reduce-security-for-testing' | 96 '--reduce-security-for-testing' |
97 ]) | 97 ]) |
98 if 'content-shell' in options.browser_type: | 98 if 'content-shell' in options.browser_type: |
99 options.AppendExtraBrowserArgs('--expose-internals-for-testing') | 99 options.AppendExtraBrowserArgs('--expose-internals-for-testing') |
100 | 100 |
101 def ValidateAndMeasurePage(self, page, tab, results): | 101 def ValidateAndMeasurePage(self, page, tab, results): |
102 tab.WaitForJavaScriptCondition('testRunner.isDone', timeout=600) | 102 tab.WaitForJavaScriptCondition('testRunner.isDone', timeout=600) |
103 | 103 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 def CreateStorySet(self, options): | 323 def CreateStorySet(self, options): |
324 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) | 324 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) |
325 return CreateStorySetFromPath( | 325 return CreateStorySetFromPath( |
326 path, SKIPPED_FILE, | 326 path, SKIPPED_FILE, |
327 shared_page_state_class=_SharedPywebsocketPageState) | 327 shared_page_state_class=_SharedPywebsocketPageState) |
328 | 328 |
329 @classmethod | 329 @classmethod |
330 def ShouldDisable(cls, possible_browser): | 330 def ShouldDisable(cls, possible_browser): |
331 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 | 331 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 |
OLD | NEW |