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
50eeda24
Unverified
Commit
50eeda24
authored
Feb 04, 2020
by
Jonah Williams
Committed by
GitHub
Feb 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] fix frontend server generated entrypoint (#50036)
parent
5039e259
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-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
+8
-0
No files found.
packages/flutter_tools/lib/src/build_runner/resident_web_runner.dart
View file @
50eeda24
...
...
@@ -515,7 +515,7 @@ class _ExperimentalResidentWebRunner extends ResidentWebRunner {
'import "
$generatedImport
";'
,
'Future<void> main() async {'
,
if
(
hasWebPlugins
)
' registerPlugins(webPluginRegistry);'
' registerPlugins(webPluginRegistry);'
,
' await ui.webOnlyInitializePlatform();'
,
' entrypoint.main();'
,
'}'
,
...
...
packages/flutter_tools/test/general.shard/resident_web_runner_test.dart
View file @
50eeda24
...
...
@@ -414,6 +414,7 @@ void main() {
test
(
'Can hot restart after attaching - experimental'
,
()
=>
testbed
.
run
(()
async
{
_setupMocks
();
launchChromeInstance
(
mockChrome
);
String
entrypointFileName
;
when
(
mockWebDevFS
.
update
(
mainPath:
anyNamed
(
'mainPath'
),
target:
anyNamed
(
'target'
),
...
...
@@ -428,6 +429,7 @@ void main() {
pathToReload:
anyNamed
(
'pathToReload'
),
invalidatedFiles:
anyNamed
(
'invalidatedFiles'
),
)).
thenAnswer
((
Invocation
invocation
)
async
{
entrypointFileName
=
invocation
.
namedArguments
[
#mainPath
]
as
String
;
return
UpdateFSReport
(
success:
true
)
..
invalidatedModules
=
<
String
>[
'example'
];
});
...
...
@@ -438,6 +440,12 @@ void main() {
await
connectionInfoCompleter
.
future
;
final
OperationResult
result
=
await
residentWebRunner
.
restart
(
fullRestart:
true
);
// Ensure that generated entrypoint is generated correctly.
expect
(
entrypointFileName
,
isNotNull
);
expect
(
globals
.
fs
.
file
(
entrypointFileName
).
readAsStringSync
(),
contains
(
'await ui.webOnlyInitializePlatform();'
));
expect
(
testLogger
.
statusText
,
contains
(
'Restarted application in'
));
expect
(
result
.
code
,
0
);
verify
(
mockResidentCompiler
.
accept
()).
called
(
2
);
...
...
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