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
80ea4542
Unverified
Commit
80ea4542
authored
Jun 08, 2020
by
Jonah Williams
Committed by
GitHub
Jun 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] change service worker load to NOTICES (#58890)
update flutter_service_worker.js to NOTICES
parent
0620cfa7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
web.dart
packages/flutter_tools/lib/src/build_system/targets/web.dart
+3
-3
web_test.dart
...ols/test/general.shard/build_system/targets/web_test.dart
+5
-1
No files found.
packages/flutter_tools/lib/src/build_system/targets/web.dart
View file @
80ea4542
...
...
@@ -378,7 +378,7 @@ class WebServiceWorker extends Target {
'/'
,
'main.dart.js'
,
'index.html'
,
'assets/
LICENSE
'
,
'assets/
NOTICES
'
,
if
(
urlToHash
.
containsKey
(
'assets/AssetManifest.json'
))
'assets/AssetManifest.json'
,
if
(
urlToHash
.
containsKey
(
'assets/FontManifest.json'
))
...
...
@@ -543,10 +543,10 @@ async function downloadOffline() {
}
for
(
var
resourceKey
in
Object
.
keys
(
RESOURCES
))
{
if
(!
currentContent
[
resourceKey
])
{
resources
.
add
(
resourceKey
);
resources
.
push
(
resourceKey
);
}
}
return
Cache
.
addAll
(
resources
);
return
content
Cache
.
addAll
(
resources
);
}
''';
}
packages/flutter_tools/test/general.shard/build_system/targets/web_test.dart
View file @
80ea4542
...
...
@@ -488,7 +488,11 @@ void main() {
contains
(
'"a/a.txt": "7fc56270e7a70fa81a5935b72eacbe29"'
));
expect
(
environment
.
buildDir
.
childFile
(
'service_worker.d'
),
exists
);
// Depends on resource file.
expect
(
environment
.
buildDir
.
childFile
(
'service_worker.d'
).
readAsStringSync
(),
contains
(
'a/a.txt'
));
expect
(
environment
.
buildDir
.
childFile
(
'service_worker.d'
).
readAsStringSync
(),
contains
(
'a/a.txt'
));
// Contains NOTICES
expect
(
environment
.
outputDir
.
childFile
(
'flutter_service_worker.js'
).
readAsStringSync
(),
contains
(
'NOTICES'
));
}));
test
(
'WebServiceWorker contains baseUrl cache'
,
()
=>
testbed
.
run
(()
async
{
...
...
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