Revert "[web:tools] always use CanvasKit from the cache when building web apps (#93002)"
This commit is contained in:
@@ -101,7 +101,7 @@ void main() {
|
||||
webResources.childFile('index.html')
|
||||
.createSync(recursive: true);
|
||||
environment.buildDir.childFile('main.dart.js').createSync();
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('version.json'), exists);
|
||||
}));
|
||||
@@ -113,7 +113,7 @@ void main() {
|
||||
final Directory webResources = environment.projectDir.childDirectory('web');
|
||||
webResources.childFile('index.html').createSync(recursive: true);
|
||||
environment.buildDir.childFile('main.dart.js').createSync();
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
final String versionFile = environment.outputDir
|
||||
.childFile('version.json')
|
||||
@@ -131,7 +131,7 @@ void main() {
|
||||
<!DOCTYPE html><html><base href="$kBaseHrefPlaceholder"><head></head></html>
|
||||
''');
|
||||
environment.buildDir.childFile('main.dart.js').createSync();
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('index.html').readAsStringSync(), contains('/basehreftest/'));
|
||||
}));
|
||||
@@ -144,7 +144,7 @@ void main() {
|
||||
<!DOCTYPE html><html><head><base href='/basehreftest/'></head></html>
|
||||
''');
|
||||
environment.buildDir.childFile('main.dart.js').createSync();
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('index.html').readAsStringSync(), contains('/basehreftest/'));
|
||||
}));
|
||||
@@ -166,7 +166,7 @@ void main() {
|
||||
.writeAsStringSync('A');
|
||||
environment.buildDir.childFile('main.dart.js').createSync();
|
||||
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('foo.txt')
|
||||
.readAsStringSync(), 'A');
|
||||
@@ -178,7 +178,7 @@ void main() {
|
||||
// Update to arbitrary resource file triggers rebuild.
|
||||
webResources.childFile('foo.txt').writeAsStringSync('B');
|
||||
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, false).build(environment);
|
||||
await const WebReleaseBundle(WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('foo.txt')
|
||||
.readAsStringSync(), 'B');
|
||||
@@ -827,7 +827,7 @@ void main() {
|
||||
environment.outputDir.childDirectory('a').childFile('a.txt')
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('A');
|
||||
await WebServiceWorker(globals.fs, globals.cache, WebRendererMode.autoDetect, false).build(environment);
|
||||
await WebServiceWorker(globals.fs, WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('flutter_service_worker.js'), exists);
|
||||
// Contains file hash.
|
||||
@@ -846,7 +846,7 @@ void main() {
|
||||
environment.outputDir
|
||||
.childFile('index.html')
|
||||
.createSync(recursive: true);
|
||||
await WebServiceWorker(globals.fs, globals.cache, WebRendererMode.autoDetect, false).build(environment);
|
||||
await WebServiceWorker(globals.fs, WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('flutter_service_worker.js'), exists);
|
||||
// Contains file hash for both `/` and index.html.
|
||||
@@ -864,7 +864,7 @@ void main() {
|
||||
environment.outputDir
|
||||
.childFile('main.dart.js.map')
|
||||
.createSync(recursive: true);
|
||||
await WebServiceWorker(globals.fs, globals.cache, WebRendererMode.autoDetect, false).build(environment);
|
||||
await WebServiceWorker(globals.fs, WebRendererMode.autoDetect, isWasm: false).build(environment);
|
||||
|
||||
// No caching of source maps.
|
||||
expect(environment.outputDir.childFile('flutter_service_worker.js').readAsStringSync(),
|
||||
@@ -896,7 +896,7 @@ void main() {
|
||||
..createSync(recursive: true)
|
||||
..writeAsStringSync('OL');
|
||||
|
||||
await WebBuiltInAssets(globals.fs, globals.cache, false).build(environment);
|
||||
await WebBuiltInAssets(globals.fs, isWasm: false).build(environment);
|
||||
|
||||
// No caching of source maps.
|
||||
final String fileGeneratorsPath = environment.artifacts
|
||||
@@ -913,7 +913,7 @@ void main() {
|
||||
globals.fs.file('bin/cache/flutter_web_sdk/canvaskit/canvaskit.wasm')
|
||||
.createSync(recursive: true);
|
||||
|
||||
await WebBuiltInAssets(globals.fs, globals.cache, true).build(environment);
|
||||
await WebBuiltInAssets(globals.fs, isWasm: true).build(environment);
|
||||
|
||||
expect(environment.outputDir.childFile('main.dart.js').existsSync(), true);
|
||||
expect(environment.outputDir.childDirectory('canvaskit')
|
||||
|
||||
Reference in New Issue
Block a user