@@ -760,7 +760,7 @@ void main() {
760760 final Cache cache = Cache .test (processManager: FakeProcessManager .any (), fileSystem: fileSystem);
761761 final Directory webCacheDirectory = cache.getWebSdkDirectory ();
762762 final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater ();
763- final FlutterWebSdk webSdk = FlutterWebSdk (cache, platform : FakePlatform () );
763+ final FlutterWebSdk webSdk = FlutterWebSdk (cache);
764764
765765 final List <String > messages = < String > [];
766766 final List <String > downloads = < String > [];
@@ -778,17 +778,14 @@ void main() {
778778
779779 expect (messages, < String > [
780780 'Downloading Web SDK...' ,
781- 'Downloading CanvasKit...' ,
782781 ]);
783782
784783 expect (downloads, < String > [
785- 'https://storage.googleapis.com/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk-linux-x64.zip' ,
786- 'https://chrome-infra-packages.appspot.com/dl/flutter/web/canvaskit_bundle/+/abcdefg' ,
784+ 'https://storage.googleapis.com/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk.zip' ,
787785 ]);
788786
789787 expect (locations, < String > [
790788 'cache/bin/cache/flutter_web_sdk' ,
791- 'cache/bin/cache/flutter_web_sdk' ,
792789 ]);
793790
794791 expect (webCacheDirectory.childFile ('foo' ), exists);
@@ -820,7 +817,7 @@ void main() {
820817 );
821818 final Directory webCacheDirectory = cache.getWebSdkDirectory ();
822819 final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater ();
823- final FlutterWebSdk webSdk = FlutterWebSdk (cache, platform : FakePlatform () );
820+ final FlutterWebSdk webSdk = FlutterWebSdk (cache);
824821
825822 final List <String > downloads = < String > [];
826823 final List <String > locations = < String > [];
@@ -835,57 +832,7 @@ void main() {
835832 await webSdk.updateInner (artifactUpdater, fileSystem, FakeOperatingSystemUtils ());
836833
837834 expect (downloads, < String > [
838- 'https://flutter.storage.com/override/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk-linux-x64.zip' ,
839- 'https://flutter.storage.com/override/flutter_infra_release/cipd/flutter/web/canvaskit_bundle/+/abcdefg' ,
840- ]);
841- });
842-
843- testWithoutContext ('FlutterWebSdk does not download CanvasKit if it is already in flutter_web_sdk' , () async {
844- final MemoryFileSystem fileSystem = MemoryFileSystem .test ();
845- final Directory internalDir = fileSystem.currentDirectory
846- .childDirectory ('cache' )
847- .childDirectory ('bin' )
848- .childDirectory ('internal' );
849- final File canvasKitVersionFile = internalDir.childFile ('canvaskit.version' );
850- canvasKitVersionFile.createSync (recursive: true );
851- canvasKitVersionFile.writeAsStringSync ('abcdefg' );
852-
853- final File engineVersionFile = internalDir.childFile ('engine.version' );
854- engineVersionFile.createSync (recursive: true );
855- engineVersionFile.writeAsStringSync ('hijklmnop' );
856-
857- final Cache cache = Cache .test (processManager: FakeProcessManager .any (), fileSystem: fileSystem);
858- final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater ();
859- final FlutterWebSdk webSdk = FlutterWebSdk (cache, platform: FakePlatform ());
860-
861- final List <String > messages = < String > [];
862- final List <String > downloads = < String > [];
863- final List <String > locations = < String > [];
864- artifactUpdater.onDownloadZipArchive = (String message, Uri uri, Directory location) {
865- messages.add (message);
866- downloads.add (uri.toString ());
867- locations.add (location.path);
868- location.createSync (recursive: true );
869- location.childDirectory ('canvaskit' ).createSync ();
870- location.childDirectory ('canvaskit' ).childFile ('canvaskit.js' ).createSync ();
871- location.childDirectory ('canvaskit' ).childFile ('canvaskit.wasm' ).createSync ();
872- location.childDirectory ('canvaskit' ).childDirectory ('profiling' ).createSync ();
873- location.childDirectory ('canvaskit' ).childDirectory ('profiling' ).childFile ('canvaskit.js' ).createSync ();
874- location.childDirectory ('canvaskit' ).childDirectory ('profiling' ).childFile ('canvaskit.wasm' ).createSync ();
875- };
876-
877- await webSdk.updateInner (artifactUpdater, fileSystem, FakeOperatingSystemUtils ());
878-
879- expect (messages, < String > [
880- 'Downloading Web SDK...' ,
881- ]);
882-
883- expect (downloads, < String > [
884- 'https://storage.googleapis.com/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk-linux-x64.zip' ,
885- ]);
886-
887- expect (locations, < String > [
888- 'cache/bin/cache/flutter_web_sdk' ,
835+ 'https://flutter.storage.com/override/flutter_infra_release/flutter/hijklmnop/flutter-web-sdk.zip' ,
889836 ]);
890837 });
891838
@@ -895,7 +842,7 @@ void main() {
895842 final Cache cache = Cache .test (processManager: FakeProcessManager .any (), fileSystem: fileSystem);
896843 final Directory webCacheDirectory = cache.getWebSdkDirectory ();
897844 final FakeArtifactUpdater artifactUpdater = FakeArtifactUpdater ();
898- final FlutterWebSdk webSdk = FlutterWebSdk (cache, platform : FakePlatform () );
845+ final FlutterWebSdk webSdk = FlutterWebSdk (cache);
899846
900847 artifactUpdater.onDownloadZipArchive = (String message, Uri uri, Directory location) {
901848 location.createSync (recursive: true );
0 commit comments