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
d8040970
Unverified
Commit
d8040970
authored
Sep 03, 2019
by
Jonah Williams
Committed by
GitHub
Sep 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
print launching on device message (#39748)
parent
af851ab6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
2 deletions
+19
-2
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+3
-1
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+16
-1
No files found.
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
d8040970
...
@@ -57,7 +57,7 @@ class ResidentWebRunner extends ResidentRunner {
...
@@ -57,7 +57,7 @@ class ResidentWebRunner extends ResidentRunner {
@required
DebuggingOptions
debuggingOptions
,
@required
DebuggingOptions
debuggingOptions
,
})
:
super
(
})
:
super
(
<
FlutterDevice
>[],
<
FlutterDevice
>[],
target:
target
,
target:
target
??
fs
.
path
.
join
(
'lib'
,
'main.dart'
)
,
debuggingOptions:
debuggingOptions
,
debuggingOptions:
debuggingOptions
,
ipv6:
ipv6
,
ipv6:
ipv6
,
stayResident:
true
,
stayResident:
true
,
...
@@ -158,6 +158,8 @@ class ResidentWebRunner extends ResidentRunner {
...
@@ -158,6 +158,8 @@ class ResidentWebRunner extends ResidentRunner {
printError
(
message
);
printError
(
message
);
return
1
;
return
1
;
}
}
final
String
modeName
=
debuggingOptions
.
buildInfo
.
friendlyModeName
;
printStatus
(
'Launching
${getDisplayPath(target)}
on
${device.name}
in
$modeName
mode...'
);
Status
buildStatus
;
Status
buildStatus
;
try
{
try
{
buildStatus
=
logger
.
startProgress
(
'Building application for the web...'
,
timeout:
null
);
buildStatus
=
logger
.
startProgress
(
'Building application for the web...'
,
timeout:
null
);
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
d8040970
...
@@ -28,12 +28,13 @@ void main() {
...
@@ -28,12 +28,13 @@ void main() {
ResidentWebRunner
residentWebRunner
;
ResidentWebRunner
residentWebRunner
;
MockDebugConnection
mockDebugConnection
;
MockDebugConnection
mockDebugConnection
;
MockVmService
mockVmService
;
MockVmService
mockVmService
;
MockWebDevice
mockWebDevice
;
setUp
(()
{
setUp
(()
{
mockWebFs
=
MockFlutterWebFs
();
mockWebFs
=
MockFlutterWebFs
();
mockDebugConnection
=
MockDebugConnection
();
mockDebugConnection
=
MockDebugConnection
();
mockVmService
=
MockVmService
();
mockVmService
=
MockVmService
();
final
MockWebDevice
mockWebDevice
=
MockWebDevice
();
mockWebDevice
=
MockWebDevice
();
testbed
=
Testbed
(
testbed
=
Testbed
(
setup:
()
{
setup:
()
{
residentWebRunner
=
ResidentWebRunner
(
residentWebRunner
=
ResidentWebRunner
(
...
@@ -357,6 +358,20 @@ void main() {
...
@@ -357,6 +358,20 @@ void main() {
await
residentWebRunner
.
exit
();
await
residentWebRunner
.
exit
();
await
residentWebRunner
.
exit
();
await
residentWebRunner
.
exit
();
}));
}));
test
(
'Prints target and device name on run'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
when
(
mockWebDevice
.
name
).
thenReturn
(
'Chromez'
);
final
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
=
Completer
<
DebugConnectionInfo
>();
unawaited
(
residentWebRunner
.
run
(
connectionInfoCompleter:
connectionInfoCompleter
,
));
await
connectionInfoCompleter
.
future
;
final
BufferLogger
bufferLogger
=
logger
;
expect
(
bufferLogger
.
statusText
,
contains
(
'Launching
${fs.path.join('lib', 'main.dart')}
on Chromez in debug mode'
));
}));
}
}
...
...
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