In `server_connection_common.dart`, the `server removes clients that
disconnect from the API` test spawned its own Chrome instance using
`package:devtools_shared`'s `Chrome` class without isolated profiles or
essential headless flags.
This caused the test to hang or fail flakily in container environments
(like LUCI bots) and local environments: 1. Without
`--use-mock-keychain`, headless Chrome on macOS blocks on system
credential dialogs. 2. Without `--no-sandbox`, Chrome renderer processes
can crash in restricted container environments. 3. Without
`--user-data-dir`, Chrome uses the default system profile, which can
cause it to attach to an existing open Chrome instance instead of
starting a new one, meaning the process exits immediately and the test
cannot terminate it.
Fixed by directly using `package:browser_launcher`'s `Chrome` class in
the test and passing:
* `--user-data-dir` pointing to a unique temporary directory.
* `--no-first-run` and `--no-default-browser-check` to bypass welcome prompts.
* `--no-sandbox` and `--use-mock-keychain` where appropriate.
Also wrapped the test in `try-finally` to guarantee cleanup of the
temporary profile directory.
Change-Id: I6fbe5a280524b57c635ab11ef54fa07dba2794cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/507600
Reviewed-by: Alexander Aprelev <aam@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The `Match.operator[]` does the same thing and is
generally recommended (and shorter).
(I want to deprecate `group` and `groups`)
Tested: Refactoring.
CoreLibraryReviewExempt: Calling equivalent function.
Change-Id: I4c758968ae622fe16b7322be1b29b05b91e7fcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
- split the Dart CLI tool out of the VM into it's own embedder which
runs in AOT mode. The pure Dart VM executable is called 'dartvm' and
has no Dart CLI functionality in it
- the Dart CLI executable parses the CLI commands and invokes the rest
of the AOT tools in the same process, for the 'run' and 'test'
commands it execs a process which runs 'dartvm' to run
- 'dart hello.dart' execs the 'dartvm' process and runs 'hello.dart'
- the Dart CLI is not generated for ia32 as we are not shipping a
Dart SDK for ia32 anymore (support to execute the 'dartvm' for ia32
architecture is retained)
- the Dart CLI tool is not built in the internal Dart SDK builds
TEST=ci
Some performance improvement numbers
'dart format pkg/dartdev' goes from 1.17 secs to 0.22 secs
'dart doc pkg/dartdev' goes from 100.2 secs to 66.6 secs
'dart fix pkg/dartdev' goes from 19.3 secs to 14.5 secs
Change-Id: I66984a26cb2ab014b34dc1873f1f3d2884e13518
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364202
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
devtools_shared 11.0.0 updates some signatures to use a new DTDInfo class to support both a local + exposed URI for DTD. A new CLI flag `--dtd-exposed-uri` for `devtools server` allows passing this second URI.
The DevTools server will use `--dtd-uri` to connect to DTD itself, but serve `--dtd-exposed-uri` to the frontend.
`--dtd-exposed-uri` is entirely optional and if not supplied, the value from `--dtd-uri` will be used in its place.
Change-Id: I5ab052ff9c4e7b2b186c1592f1ba2d63b7711113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/383400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
It's only valid to reuse a client that is not showing an embedded page, however we only get the embedded flag when a client sends a "currentPage" event.
There is a period between a client connecting and sending this event where we would consider it reusable when it's not. This fixes that by keeping a flag to indicate if a client has completed initializing (that is, it has sent its initial page).
See https://github.com/Dart-Code/Dart-Code/issues/4832
Change-Id: I9f2d43d1537ee97e4e231a844831e7548cf07beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336041
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
DevTools no longer expects a fragment (i.e., '#') in its path, which was
causing issues when attempting to redirect to an external DevTools
instance.
Also removes unnecessary query parameter encoding.
TEST=Existing tests
Change-Id: Ifbeba62c173141a754951527f44ab337318a21d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278669
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
The test harness wasn't waiting on `CliAppFixture.onAppStarted` which
could cause an unhandled exception if the test cleanup started before
the target application finished initializing. This typically only
occurred while the test was running on a machine under load.
Fixes https://github.com/dart-lang/sdk/issues/48669
TEST=Locally while running under load (e.g., `stress -c 72`)
Change-Id: Ieb67e46f62c33101490899440574fb57fc0f8882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238922
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>