Skip to content

Commit da8a25c

Browse files
authored
[browser_launcher] Add --test-type flag (#2311)
Closes #2300 Some flags like disabling `TimerThrottlingForBackgroundTabs` cause warnings when launching chrome because it is not recommended for use during general browsing. Suppress these types of warnings with the `--test-type` flag which indicates to chrome that this is a dev focused workflow where such flags are expected.
1 parent 070aaa4 commit da8a25c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pkgs/browser_launcher/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.0-wip
2+
3+
- Add `--test-type` flag when launching chrome to prevent some warnings.
4+
15
## 1.1.3
26

37
- Move to `dart-lang/tools` monorepo.

pkgs/browser_launcher/lib/src/chrome.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ class Chrome {
118118
// credentials. This uses a mock keychain to avoid that dialog from
119119
// blocking.
120120
'--use-mock-keychain',
121+
// Prevent warnings for using flags that are not recommended for general
122+
// browsing but are applicable for use in dev-focused workflows.
123+
'--test-type',
121124
];
122125
if (headless) {
123126
args.add('--headless');

pkgs/browser_launcher/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: browser_launcher
2-
version: 1.1.3
2+
version: 1.2.0-wip
33
description: Provides a standardized way to launch web browsers for testing and tools.
44
repository: https://github.com/dart-lang/tools/tree/main/pkgs/browser_launcher
55
issue_tracker: https://github.com/dart-lang/tools/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Abrowser_launcher

0 commit comments

Comments
 (0)