mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[flutter_tools] change service worker load to NOTICES (#58890)
update flutter_service_worker.js to NOTICES
This commit is contained in:
parent
0620cfa770
commit
80ea454288
@ -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 contentCache.addAll(resources);
|
||||
}
|
||||
''';
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user