Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
b7932853
Unverified
Commit
b7932853
authored
Dec 18, 2020
by
Kenzie Schmoll
Committed by
GitHub
Dec 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --no-launch-browser flag to DevTools pub run command (#72519)
parent
3d06d66b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
0 deletions
+37
-0
devtools_launcher.dart
packages/flutter_tools/lib/src/devtools_launcher.dart
+1
-0
devtools_launcher_test.dart
...tter_tools/test/general.shard/devtools_launcher_test.dart
+36
-0
No files found.
packages/flutter_tools/lib/src/devtools_launcher.dart
View file @
b7932853
...
...
@@ -71,6 +71,7 @@ class DevtoolsServerLauncher extends DevtoolsLauncher {
'global'
,
'run'
,
'devtools'
,
if
(!
openInBrowser
)
'--no-launch-browser'
,
if
(
vmServiceUri
!=
null
)
'--vm-uri=
$vmServiceUri
'
,
]);
final
Completer
<
Uri
>
completer
=
Completer
<
Uri
>();
...
...
packages/flutter_tools/test/general.shard/devtools_launcher_test.dart
View file @
b7932853
...
...
@@ -34,6 +34,7 @@ void main() {
'global'
,
'run'
,
'devtools'
,
'--no-launch-browser'
,
],
stdout:
'Serving DevTools at http://127.0.0.1:9100
\n
'
,
completer:
completer
,
...
...
@@ -46,6 +47,39 @@ void main() {
expect
(
address
.
port
,
9100
);
});
testWithoutContext
(
'DevtoolsLauncher launches DevTools in browser'
,
()
async
{
final
Completer
<
void
>
completer
=
Completer
<
void
>();
final
DevtoolsLauncher
launcher
=
DevtoolsServerLauncher
(
pubExecutable:
'pub'
,
logger:
BufferLogger
.
test
(),
processManager:
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'pub'
,
'global'
,
'activate'
,
'devtools'
,
],
stdout:
'Activated DevTools 0.9.5'
,
),
FakeCommand
(
command:
const
<
String
>[
'pub'
,
'global'
,
'run'
,
'devtools'
,
],
stdout:
'Serving DevTools at http://127.0.0.1:9100
\n
'
,
completer:
completer
,
),
]),
);
final
DevToolsServerAddress
address
=
await
launcher
.
serve
(
openInBrowser:
true
);
expect
(
address
.
host
,
'127.0.0.1'
);
expect
(
address
.
port
,
9100
);
});
testWithoutContext
(
'DevtoolsLauncher prints error if exception is thrown during activate'
,
()
async
{
final
BufferLogger
logger
=
BufferLogger
.
test
();
final
DevtoolsLauncher
launcher
=
DevtoolsServerLauncher
(
...
...
@@ -68,6 +102,7 @@ void main() {
'global'
,
'run'
,
'devtools'
,
'--no-launch-browser'
,
'--vm-uri=http://127.0.0.1:1234/abcdefg'
,
],
onRun:
()
{
...
...
@@ -103,6 +138,7 @@ void main() {
'global'
,
'run'
,
'devtools'
,
'--no-launch-browser'
,
'--vm-uri=http://127.0.0.1:1234/abcdefg'
,
],
onRun:
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment