[web:tools] always use CanvasKit from the cache when building web apps (#93002)

This commit is contained in:
Yegor
2021-11-03 17:48:25 -07:00
committed by GitHub
parent 6cd39cce1d
commit 773789344e
4 changed files with 19 additions and 9 deletions

View File

@@ -637,7 +637,7 @@ void main() {
environment.outputDir.childDirectory('a').childFile('a.txt')
..createSync(recursive: true)
..writeAsStringSync('A');
await WebServiceWorker(globals.fs).build(environment);
await WebServiceWorker(globals.fs, globals.cache).build(environment);
expect(environment.outputDir.childFile('flutter_service_worker.js'), exists);
// Contains file hash.
@@ -656,7 +656,7 @@ void main() {
environment.outputDir
.childFile('index.html')
.createSync(recursive: true);
await WebServiceWorker(globals.fs).build(environment);
await WebServiceWorker(globals.fs, globals.cache).build(environment);
expect(environment.outputDir.childFile('flutter_service_worker.js'), exists);
// Contains file hash for both `/` and index.html.
@@ -674,7 +674,7 @@ void main() {
environment.outputDir
.childFile('main.dart.js.map')
.createSync(recursive: true);
await WebServiceWorker(globals.fs).build(environment);
await WebServiceWorker(globals.fs, globals.cache).build(environment);
// No caching of source maps.
expect(environment.outputDir.childFile('flutter_service_worker.js').readAsStringSync(),