-
Notifications
You must be signed in to change notification settings - Fork 56
Merge package:browser_launcher
#689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
be8b9aa
first commit
kenzieschmoll b36f3fa
Setup package skeleton for browser_launcher
kenzieschmoll e8124d4
small tweaks to readme and .gitignore (dart-lang/browser_launcher#2)
kevmoo a6ce764
Add travis badge to readme (dart-lang/browser_launcher#3)
kevmoo 705313d
Add chrome launching code to browser_launcher (dart-lang/browser_laun…
kenzieschmoll 1123d7f
Prepare browser_launcher for 0.1.0 release (dart-lang/browser_launche…
kenzieschmoll 3e62c4e
Add example to improve pub score. (dart-lang/browser_launcher#6)
kenzieschmoll 842d7b4
Prepare for 0.1.1 release. (dart-lang/browser_launcher#7)
kenzieschmoll 1aae1f2
Change min sdk and prepare for release 0.1.2 (dart-lang/browser_launc…
kenzieschmoll 276f56b
widen the version range on webkit_inspection_protocol (dart-lang/brow…
devoncarew 810b852
rev to 0.1.3 (dart-lang/browser_launcher#11)
devoncarew 2e67248
Return process from start() (dart-lang/browser_launcher#12)
DanTup 7358e2a
Start Chrome maximized (dart-lang/browser_launcher#13)
grouma 7013135
Allow passing in a user-data-dir (dart-lang/browser_launcher#14)
alan-knight eaf6c0c
Update lower SDK bound to 2.2.0 (dart-lang/browser_launcher#15)
kevmoo 88e6bdb
widen the dep range on package:webkit_inspection_protocol (dart-lang/…
devoncarew 16b9e73
rev to 0.1.7 (dart-lang/browser_launcher#18)
devoncarew 559c143
Migrate to Github Actions (dart-lang/browser_launcher#21)
grouma e3f4395
Update badge (dart-lang/browser_launcher#22)
kevmoo cb4ab86
Only show CI results for master (dart-lang/browser_launcher#23)
grouma 0e93231
Adding additional Chrome environment variables for executable resolut…
Markzipan 874023a
Support latest webkit_inspection_protocol (dart-lang/browser_launcher…
grouma 8140ac1
Update LICENSE
franklinyow 723189a
Update CI bits (dart-lang/browser_launcher#26)
kevmoo bf3087d
Migrate browser_launcher to null-safety. (dart-lang/browser_launcher#27)
kenzieschmoll 6b588f7
Move to pkg:lints (dart-lang/browser_launcher#28)
kevmoo b8aadc7
Allow signing into default profile and enabling extensions (dart-lang…
d9374a7
enable the avoid_dynamic_calls lint (dart-lang/browser_launcher#30)
devoncarew ad39f10
Update version (dart-lang/browser_launcher#31)
9934ace
Update pubspec.yaml (dart-lang/browser_launcher#32)
devoncarew dc9cb60
prep for publishing (dart-lang/browser_launcher#33)
devoncarew 9463626
Update lints, require Dart 2.17, add dependabot (dart-lang/browser_la…
kevmoo 0191084
Fix internal CI test failures (dart-lang/browser_launcher#35)
ae0d2ea
Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/browser_launcher…
dependabot[bot] ed93e5e
Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/browser_launcher…
dependabot[bot] 2344639
Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/browser_launcher…
dependabot[bot] b68ab87
Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/browser_launcher…
dependabot[bot] 3228262
Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/browser_laun…
dependabot[bot] 2ad7f58
Disable test (dart-lang/browser_launcher#44)
elliette 990caec
Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/browser_launcher…
dependabot[bot] 24a0153
blast_repo fixes (dart-lang/browser_launcher#45)
devoncarew 1a99465
update formatting for recent lints (dart-lang/browser_launcher#47)
devoncarew 6d5ac87
Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/browser_launcher…
dependabot[bot] d4c13c6
Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/browser_launcher…
dependabot[bot] af2bc2c
Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/browser_launcher…
dependabot[bot] 84e3f15
Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/browser_laun…
dependabot[bot] 7248b76
Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/browser_launcher…
dependabot[bot] c908ef3
Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/browser_laun…
dependabot[bot] 33b8c66
Update and fix lints, require Dart 3.0 (dart-lang/browser_launcher#53)
kevmoo 2b05a66
drop outdated lints
kevmoo 606134a
Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/browser_laun…
dependabot[bot] ee14d22
Add extra flags to disable throttling behavior. (dart-lang/browser_la…
sigmundch 45d8578
Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/browser_launcher…
dependabot[bot] 0e72faa
Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/browser_laun…
dependabot[bot] ea9fcad
Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/browser_launcher…
dependabot[bot] 1e99a86
blast_repo fixes (dart-lang/browser_launcher#59)
devoncarew 5d5082e
Bump actions/checkout from 4.1.4 to 4.1.6 in the github-actions group…
dependabot[bot] 2ff8ff9
Bump the github-actions group with 2 updates (dart-lang/browser_launc…
dependabot[bot] 8ed7db4
update lints (dart-lang/browser_launcher#62)
kevmoo 2c690eb
Add --use-mock-keychain to Chrome args (dart-lang/browser_launcher#63)
srujzs 7e49da4
Add CHANGELOG entry for https://github.com/dart-lang/browser_launcher…
srujzs dd6f222
Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group…
dependabot[bot] 9df6358
Merge package:browser_launcher into the tools monorepo
mosuem 82f509f
Add issue template and other fixes
mosuem 81400d7
Moving fixes
mosuem 96c7b01
Changes as per review
mosuem 561291e
Remove lint rule
mosuem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
name: "package:browser_launcher" | ||
about: "Create a bug or file a feature request against package:browser_launcher." | ||
labels: "package:browser_launcher" | ||
--- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: package:browser_launcher | ||
|
||
on: | ||
# Run on PRs and pushes to the default branch. | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/browser_launcher.yml' | ||
- 'pkgs/browser_launcher/**' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/browser_launcher.yml' | ||
- 'pkgs/browser_launcher/**' | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
|
||
env: | ||
PUB_ENVIRONMENT: bot.github | ||
DISPLAY: ':99' | ||
|
||
defaults: | ||
run: | ||
working-directory: pkgs/browser_launcher/ | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
sdk: [3.4, dev] | ||
steps: | ||
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 | ||
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
|
||
- run: dart pub get | ||
|
||
- run: dart format --output=none --set-exit-if-changed . | ||
- run: dart analyze --fatal-infos | ||
|
||
- name: Run Xvfb | ||
run: Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & | ||
|
||
- run: dart test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Don’t commit the following directories created by pub. | ||
.dart_tool/ | ||
.packages | ||
pubspec.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Below is a list of people and organizations that have contributed | ||
# to the project. Names should be added to the list like so: | ||
# | ||
# Name/Organization <email address> | ||
|
||
Google Inc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
## 1.1.3 | ||
|
||
- Move to `dart-lang/tools` monorepo. | ||
|
||
## 1.1.2 | ||
|
||
- Require Dart 3.4 | ||
- Log errors from chrome | ||
- Allow tests to detect headless-only environment (for CI). | ||
- Add extra flags that may help disable additional throttling in background tabs | ||
- Add `--use-mock-keychain` flag to avoid blocking dialog on MacOS. | ||
|
||
## 1.1.1 | ||
|
||
- Populate the pubspec `repository` field. | ||
|
||
## 1.1.0 | ||
|
||
- Add optional `signIn` argument to `startWithDebugPort`. | ||
To be used together with `user-data-dir` to start a Chrome | ||
window signed in to the default profile with extensions enabled. | ||
- Enable the `avoid_dynamic_calls` lint. | ||
|
||
## 1.0.0 | ||
|
||
- Migrate to null-safety. | ||
|
||
## 0.1.10 | ||
|
||
- Support `webkit_inspection_protocol` version `^1.0.0`. | ||
|
||
## 0.1.9 | ||
|
||
- Add support for Chrome executables in `CHROME_PATH`. | ||
|
||
## 0.1.8 | ||
|
||
- Log `STDERR` on Chrome launch failure. | ||
|
||
## 0.1.7 | ||
|
||
- Widen the dependency range on `package:webkit_inspection_protocol`. | ||
|
||
## 0.1.6 | ||
|
||
- Update lower Dart SDK requirement to `2.2.0`. | ||
- Update the dependency range on `package:webkit_inspection_protocol`. | ||
|
||
## 0.1.5 | ||
|
||
- Add a parameter to use a specified user-data-dir instead of a system temp. | ||
|
||
## 0.1.4 | ||
|
||
- Start Chrome maximized. | ||
|
||
## 0.1.3 | ||
|
||
- widen the version constraint on `package:webkit_inspection_protocol` | ||
|
||
## 0.1.2 | ||
|
||
- lower min sdk version to match Flutter stable | ||
|
||
## 0.1.1 | ||
|
||
- added example | ||
|
||
## 0.1.0 | ||
|
||
- initial release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright 2019, the Dart project authors. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are | ||
met: | ||
|
||
* Redistributions of source code must retain the above copyright | ||
notice, this list of conditions and the following disclaimer. | ||
* Redistributions in binary form must reproduce the above | ||
copyright notice, this list of conditions and the following | ||
disclaimer in the documentation and/or other materials provided | ||
with the distribution. | ||
* Neither the name of Google LLC nor the names of its | ||
contributors may be used to endorse or promote products derived | ||
from this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[](https://github.com/dart-lang/tools/actions/workflows/browser_launcher.yaml) | ||
[](https://pub.dev/packages/browser_launcher) | ||
[](https://pub.dev/packages/browser_launcher/publisher) | ||
|
||
Provides a standardized way to launch web browsers. | ||
|
||
Currently, Chrome is the only supported browser; support for other browsers may | ||
be added in the future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# https://dart.dev/guides/language/analysis-options | ||
include: package:dart_flutter_team_lints/analysis_options.yaml | ||
|
||
analyzer: | ||
language: | ||
strict-casts: true | ||
strict-inference: true | ||
strict-raw-types: true | ||
|
||
linter: | ||
rules: | ||
- avoid_bool_literals_in_conditional_expressions | ||
- avoid_classes_with_only_static_members | ||
- avoid_private_typedef_functions | ||
- avoid_redundant_argument_values | ||
- avoid_returning_this | ||
- avoid_unused_constructor_parameters | ||
- avoid_void_async | ||
- cancel_subscriptions | ||
- join_return_with_assignment | ||
- literal_only_boolean_expressions | ||
- missing_whitespace_between_adjacent_strings | ||
- no_adjacent_strings_in_list | ||
- no_runtimeType_toString | ||
- prefer_const_declarations | ||
- prefer_expression_function_bodies | ||
- prefer_final_locals | ||
- require_trailing_commas | ||
- unnecessary_raw_strings | ||
- use_if_null_to_convert_nulls_to_bools | ||
- use_raw_strings | ||
- use_string_buffers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:browser_launcher/browser_launcher.dart'; | ||
|
||
const _googleUrl = 'https://www.google.com/'; | ||
const _googleImagesUrl = 'https://www.google.com/imghp?hl=en'; | ||
|
||
Future<void> main() async { | ||
// Launches a chrome browser with two tabs open to [_googleUrl] and | ||
// [_googleImagesUrl]. | ||
await Chrome.start([_googleUrl, _googleImagesUrl]); | ||
print('launched Chrome'); | ||
|
||
// Pause briefly before opening Chrome with a debug port. | ||
await Future<void>.delayed(const Duration(seconds: 3)); | ||
|
||
// Launches a chrome browser open to [_googleUrl]. Since we are launching with | ||
// a debug port, we will use a variety of different launch configurations, | ||
// such as launching in a new browser. | ||
final chrome = await Chrome.startWithDebugPort([_googleUrl], debugPort: 8888); | ||
print('launched Chrome with a debug port'); | ||
|
||
// When running this dart code, observe that the browser stays open for 3 | ||
// seconds before we close it. | ||
await Future<void>.delayed(const Duration(seconds: 3)); | ||
|
||
await chrome.close(); | ||
print('closed Chrome'); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
export 'src/chrome.dart'; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.