| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 '--enable-experimental-web-platform-features', | 90 '--enable-experimental-web-platform-features', |
| 91 '--disable-gesture-requirement-for-media-playback', | 91 '--disable-gesture-requirement-for-media-playback', |
| 92 '--enable-experimental-canvas-features', | 92 '--enable-experimental-canvas-features', |
| 93 # TODO(qinmin): After fixing crbug.com/592017, remove this command line. | 93 # TODO(qinmin): After fixing crbug.com/592017, remove this command line. |
| 94 '--reduce-security-for-testing' | 94 '--reduce-security-for-testing' |
| 95 ]) | 95 ]) |
| 96 if 'content-shell' in options.browser_type: | 96 if 'content-shell' in options.browser_type: |
| 97 options.AppendExtraBrowserArgs('--expose-internals-for-testing') | 97 options.AppendExtraBrowserArgs('--expose-internals-for-testing') |
| 98 | 98 |
| 99 def ValidateAndMeasurePage(self, page, tab, results): | 99 def ValidateAndMeasurePage(self, page, tab, results): |
| 100 tab.WaitForJavaScriptCondition2('testRunner.isDone', timeout=600) | 100 tab.WaitForJavaScriptCondition('testRunner.isDone', timeout=600) |
| 101 | 101 |
| 102 log = tab.EvaluateJavaScript2('document.getElementById("log").innerHTML') | 102 log = tab.EvaluateJavaScript('document.getElementById("log").innerHTML') |
| 103 | 103 |
| 104 for line in log.splitlines(): | 104 for line in log.splitlines(): |
| 105 if line.startswith("FATAL: "): | 105 if line.startswith("FATAL: "): |
| 106 print line | 106 print line |
| 107 continue | 107 continue |
| 108 if not line.startswith('values '): | 108 if not line.startswith('values '): |
| 109 continue | 109 continue |
| 110 parts = line.split() | 110 parts = line.split() |
| 111 values = [float(v.replace(',', '')) for v in parts[1:-1]] | 111 values = [float(v.replace(',', '')) for v in parts[1:-1]] |
| 112 units = parts[-1] | 112 units = parts[-1] |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 def CreateStorySet(self, options): | 257 def CreateStorySet(self, options): |
| 258 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) | 258 path = os.path.join(BLINK_PERF_BASE_DIR, self.subdir) |
| 259 return CreateStorySetFromPath( | 259 return CreateStorySetFromPath( |
| 260 path, SKIPPED_FILE, | 260 path, SKIPPED_FILE, |
| 261 shared_page_state_class=_SharedPywebsocketPageState) | 261 shared_page_state_class=_SharedPywebsocketPageState) |
| 262 | 262 |
| 263 @classmethod | 263 @classmethod |
| 264 def ShouldDisable(cls, possible_browser): | 264 def ShouldDisable(cls, possible_browser): |
| 265 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 | 265 return cls.IsSvelte(possible_browser) # http://crbug.com/551950 |
| OLD | NEW |