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
be3a4b37
Unverified
Commit
be3a4b37
authored
Mar 27, 2020
by
Jonah Williams
Committed by
GitHub
Mar 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] don't trim log messages from the web (#53379)
parent
2717eb64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
resident_web_runner.dart
...utter_tools/lib/src/build_runner/resident_web_runner.dart
+1
-1
resident_web_runner_test.dart
...er_tools/test/general.shard/resident_web_runner_test.dart
+24
-0
No files found.
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
be3a4b37
...
@@ -672,7 +672,7 @@ class _ResidentWebRunner extends ResidentWebRunner {
...
@@ -672,7 +672,7 @@ class _ResidentWebRunner extends ResidentWebRunner {
// thrown if we're not already subscribed.
// thrown if we're not already subscribed.
}
}
_stdOutSub
=
_vmService
.
onStdoutEvent
.
listen
((
vmservice
.
Event
log
)
{
_stdOutSub
=
_vmService
.
onStdoutEvent
.
listen
((
vmservice
.
Event
log
)
{
final
String
message
=
utf8
.
decode
(
base64
.
decode
(
log
.
bytes
))
.
trim
()
;
final
String
message
=
utf8
.
decode
(
base64
.
decode
(
log
.
bytes
));
globals
.
printStatus
(
message
);
globals
.
printStatus
(
message
);
});
});
unawaited
(
_vmService
.
registerService
(
'reloadSources'
,
'FlutterTools'
));
unawaited
(
_vmService
.
registerService
(
'reloadSources'
,
'FlutterTools'
));
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
be3a4b37
...
@@ -480,6 +480,30 @@ void main() {
...
@@ -480,6 +480,30 @@ void main() {
Usage:
()
=>
MockFlutterUsage
(),
Usage:
()
=>
MockFlutterUsage
(),
}));
}));
test
(
'Faithfully displays stdout messages with leading/trailing spaces'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
final
StreamController
<
Event
>
stdoutController
=
StreamController
<
Event
>();
when
(
mockVmService
.
onStdoutEvent
).
thenAnswer
((
Invocation
invocation
)
{
return
stdoutController
.
stream
;
});
final
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
=
Completer
<
DebugConnectionInfo
>();
unawaited
(
residentWebRunner
.
run
(
connectionInfoCompleter:
connectionInfoCompleter
,
));
await
connectionInfoCompleter
.
future
;
stdoutController
.
add
(
Event
(
timestamp:
0
,
kind:
'Stdout'
,
bytes:
base64
.
encode
(
utf8
.
encode
(
' This is a message with 4 leading and trailing spaces '
))),
);
// Wait one event loop for the stream listener to fire.
await
null
;
expect
(
testLogger
.
statusText
,
contains
(
' This is a message with 4 leading and trailing spaces '
));
}));
test
(
'Fails on compilation errors in hot restart'
,
()
=>
testbed
.
run
(()
async
{
test
(
'Fails on compilation errors in hot restart'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
_setupMocks
();
final
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
=
Completer
<
DebugConnectionInfo
>();
final
Completer
<
DebugConnectionInfo
>
connectionInfoCompleter
=
Completer
<
DebugConnectionInfo
>();
...
...
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