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 logging | 5 import logging |
6 import os | 6 import os |
7 import pprint | 7 import pprint |
8 import re | 8 import re |
9 import shlex | 9 import shlex |
10 import sys | 10 import sys |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 # TODO(crbug.com/760319): This is a hack to temporarily disable modal | 78 # TODO(crbug.com/760319): This is a hack to temporarily disable modal |
79 # permission prompts on Android. Remove after implementing a longer term | 79 # permission prompts on Android. Remove after implementing a longer term |
80 # solution. | 80 # solution. |
81 if self.browser_options.block_modal_permission_prompts: | 81 if self.browser_options.block_modal_permission_prompts: |
82 for i, arg in enumerate(args): | 82 for i, arg in enumerate(args): |
83 if arg.startswith('--enable-features='): | 83 if arg.startswith('--enable-features='): |
84 args[i] = re.sub(r',\w+<PermissionPromptUIAndroidModal\b', '', arg) | 84 args[i] = re.sub(r',\w+<PermissionPromptUIAndroidModal\b', '', arg) |
85 elif arg.startswith('--force-fieldtrials='): | 85 elif arg.startswith('--force-fieldtrials='): |
86 args[i] = re.sub(r'\bPermissionPromptUIAndroidModal/\w+/', '', arg) | 86 args[i] = re.sub(r'\bPermissionPromptUIAndroidModal/\w+/', '', arg) |
| 87 elif arg.startswith('--disable-features='): |
| 88 args[i] = ','.join([ |
| 89 args[i], 'ModalPermissionPrompts<PermissionPromptUIAndroidModal']) |
87 | 90 |
88 args.append('--enable-net-benchmarking') | 91 args.append('--enable-net-benchmarking') |
89 args.append('--metrics-recording-only') | 92 args.append('--metrics-recording-only') |
90 args.append('--no-default-browser-check') | 93 args.append('--no-default-browser-check') |
91 args.append('--no-first-run') | 94 args.append('--no-first-run') |
92 | 95 |
93 # Turn on GPU benchmarking extension for all runs. The only side effect of | 96 # Turn on GPU benchmarking extension for all runs. The only side effect of |
94 # the extension being on is that render stats are tracked. This is believed | 97 # the extension being on is that render stats are tracked. This is believed |
95 # to be effectively free. And, by doing so here, it avoids us having to | 98 # to be effectively free. And, by doing so here, it avoids us having to |
96 # programmatically inspect a pageset's actions in order to determine if it | 99 # programmatically inspect a pageset's actions in order to determine if it |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 def supports_cpu_metrics(self): | 339 def supports_cpu_metrics(self): |
337 return True | 340 return True |
338 | 341 |
339 @property | 342 @property |
340 def supports_memory_metrics(self): | 343 def supports_memory_metrics(self): |
341 return True | 344 return True |
342 | 345 |
343 @property | 346 @property |
344 def supports_power_metrics(self): | 347 def supports_power_metrics(self): |
345 return True | 348 return True |
OLD | NEW |