diff --git a/dev/benchmarks/complex_layout/pubspec.yaml b/dev/benchmarks/complex_layout/pubspec.yaml index 6d66b93c8ee..ea137543ded 100644 --- a/dev/benchmarks/complex_layout/pubspec.yaml +++ b/dev/benchmarks/complex_layout/pubspec.yaml @@ -19,20 +19,27 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -43,7 +50,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -64,21 +70,17 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -88,4 +90,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: 6324 +# PUBSPEC CHECKSUM: 4929 diff --git a/dev/benchmarks/macrobenchmarks/pubspec.yaml b/dev/benchmarks/macrobenchmarks/pubspec.yaml index ee88edbc9c8..b316a151357 100644 --- a/dev/benchmarks/macrobenchmarks/pubspec.yaml +++ b/dev/benchmarks/macrobenchmarks/pubspec.yaml @@ -19,20 +19,27 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -43,7 +50,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -64,21 +70,17 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -212,4 +214,4 @@ flutter: fonts: - asset: packages/flutter_gallery_assets/fonts/GalleryIcons.ttf -# PUBSPEC CHECKSUM: f9f4 +# PUBSPEC CHECKSUM: 06f9 diff --git a/dev/benchmarks/platform_views_layout/pubspec.yaml b/dev/benchmarks/platform_views_layout/pubspec.yaml index f106c69133b..faab7ce9fc8 100644 --- a/dev/benchmarks/platform_views_layout/pubspec.yaml +++ b/dev/benchmarks/platform_views_layout/pubspec.yaml @@ -18,20 +18,27 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -41,7 +48,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,21 +68,17 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -86,4 +88,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: 977c +# PUBSPEC CHECKSUM: 2b81 diff --git a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml index 3632358b2c3..33f4366b3c9 100644 --- a/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml +++ b/dev/benchmarks/platform_views_layout_hybrid_composition/pubspec.yaml @@ -18,20 +18,27 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -41,7 +48,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,21 +68,17 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -86,4 +88,4 @@ flutter: - packages/flutter_gallery_assets/people/square/ali.png - packages/flutter_gallery_assets/places/india_chettinad_silk_maker.png -# PUBSPEC CHECKSUM: 977c +# PUBSPEC CHECKSUM: 2b81 diff --git a/dev/benchmarks/test_apps/stocks/pubspec.yaml b/dev/benchmarks/test_apps/stocks/pubspec.yaml index fdb02b2a630..5924800e2c7 100644 --- a/dev/benchmarks/test_apps/stocks/pubspec.yaml +++ b/dev/benchmarks/test_apps/stocks/pubspec.yaml @@ -61,6 +61,7 @@ dev_dependencies: file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_multi_server: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -78,6 +79,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -85,4 +87,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: a800 +# PUBSPEC CHECKSUM: 0d05 diff --git a/dev/integration_tests/android_semantics_testing/pubspec.yaml b/dev/integration_tests/android_semantics_testing/pubspec.yaml index cd68b70e8df..ddec3514b19 100644 --- a/dev/integration_tests/android_semantics_testing/pubspec.yaml +++ b/dev/integration_tests/android_semantics_testing/pubspec.yaml @@ -31,6 +31,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -60,6 +61,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -69,4 +71,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 5c71 +# PUBSPEC CHECKSUM: 3a76 diff --git a/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml b/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml index 85f43620d69..c55eed65efd 100644 --- a/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml +++ b/dev/integration_tests/android_splash_screens/splash_screen_kitchen_sink/pubspec.yaml @@ -64,6 +64,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -90,6 +91,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -134,4 +136,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: 4c7f +# PUBSPEC CHECKSUM: e284 diff --git a/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml b/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml index 5ab206e34c2..4c76d68dff3 100644 --- a/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml +++ b/dev/integration_tests/android_splash_screens/splash_screen_trans_rotate/pubspec.yaml @@ -64,6 +64,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -90,6 +91,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -134,4 +136,4 @@ flutter: # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages -# PUBSPEC CHECKSUM: 4c7f +# PUBSPEC CHECKSUM: e284 diff --git a/dev/integration_tests/android_views/pubspec.yaml b/dev/integration_tests/android_views/pubspec.yaml index 2dbe4dd4c0c..78f56c3a803 100644 --- a/dev/integration_tests/android_views/pubspec.yaml +++ b/dev/integration_tests/android_views/pubspec.yaml @@ -19,11 +19,13 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -33,11 +35,16 @@ dependencies: platform: 3.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" process: 4.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" xdg_directories: 0.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -48,7 +55,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -69,25 +75,21 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter: uses-material-design: true -# PUBSPEC CHECKSUM: becb +# PUBSPEC CHECKSUM: d4d0 diff --git a/dev/integration_tests/channels/pubspec.yaml b/dev/integration_tests/channels/pubspec.yaml index 08162a9f04a..40334c1fd88 100644 --- a/dev/integration_tests/channels/pubspec.yaml +++ b/dev/integration_tests/channels/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,6 +63,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -71,4 +73,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 5c71 +# PUBSPEC CHECKSUM: 3a76 diff --git a/dev/integration_tests/external_ui/pubspec.yaml b/dev/integration_tests/external_ui/pubspec.yaml index c9fb187a320..19f9191c712 100644 --- a/dev/integration_tests/external_ui/pubspec.yaml +++ b/dev/integration_tests/external_ui/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,6 +63,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -71,4 +73,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 5c71 +# PUBSPEC CHECKSUM: 3a76 diff --git a/dev/integration_tests/flavors/pubspec.yaml b/dev/integration_tests/flavors/pubspec.yaml index e6a7a595c9e..c0a05bb1f1a 100644 --- a/dev/integration_tests/flavors/pubspec.yaml +++ b/dev/integration_tests/flavors/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,6 +63,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -71,4 +73,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 5c71 +# PUBSPEC CHECKSUM: 3a76 diff --git a/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml b/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml index a213ff1a9bc..7a878d65210 100644 --- a/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml +++ b/dev/integration_tests/flutter_driver_screenshot_test/pubspec.yaml @@ -14,6 +14,7 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" collection: 1.15.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -21,15 +22,21 @@ dependencies: crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" device_info_platform_interface: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -37,7 +44,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" coverage: 0.14.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -56,21 +62,17 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -79,4 +81,4 @@ flutter: assets: - assets/ -# PUBSPEC CHECKSUM: e9a2 +# PUBSPEC CHECKSUM: d5a7 diff --git a/dev/integration_tests/flutter_gallery/pubspec.yaml b/dev/integration_tests/flutter_gallery/pubspec.yaml index 07add2439b1..82675d06f6c 100644 --- a/dev/integration_tests/flutter_gallery/pubspec.yaml +++ b/dev/integration_tests/flutter_gallery/pubspec.yaml @@ -73,6 +73,7 @@ dev_dependencies: http_multi_server: 2.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -97,6 +98,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -274,4 +276,4 @@ flutter: - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Regular.ttf - asset: packages/flutter_gallery_assets/fonts/merriweather/Merriweather-Light.ttf -# PUBSPEC CHECKSUM: 6c29 +# PUBSPEC CHECKSUM: 672e diff --git a/dev/integration_tests/hybrid_android_views/pubspec.yaml b/dev/integration_tests/hybrid_android_views/pubspec.yaml index eeacf03d922..d13d6ec3aea 100644 --- a/dev/integration_tests/hybrid_android_views/pubspec.yaml +++ b/dev/integration_tests/hybrid_android_views/pubspec.yaml @@ -19,11 +19,13 @@ dependencies: archive: 2.0.13 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" args: 1.6.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" characters: 1.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" charcode: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -33,11 +35,16 @@ dependencies: platform: 3.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" plugin_platform_interface: 1.0.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" process: 4.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" xdg_directories: 0.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -48,7 +55,6 @@ dev_dependencies: _fe_analyzer_shared: 7.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" analyzer: 0.39.17 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - async: 2.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" boolean_selector: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" cli_util: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" clock: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -69,25 +75,21 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_web_socket: 0.2.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" string_scanner: 1.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" flutter: uses-material-design: true -# PUBSPEC CHECKSUM: becb +# PUBSPEC CHECKSUM: d4d0 diff --git a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml index e192175d5a6..9c520610b09 100644 --- a/dev/integration_tests/ios_platform_view_tests/pubspec.yaml +++ b/dev/integration_tests/ios_platform_view_tests/pubspec.yaml @@ -43,6 +43,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -69,6 +70,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -82,4 +84,4 @@ flutter: # the material Icons class. uses-material-design: true -# PUBSPEC CHECKSUM: b4dc +# PUBSPEC CHECKSUM: a8e1 diff --git a/dev/integration_tests/platform_interaction/pubspec.yaml b/dev/integration_tests/platform_interaction/pubspec.yaml index c9e08db24cc..d3b434645e8 100644 --- a/dev/integration_tests/platform_interaction/pubspec.yaml +++ b/dev/integration_tests/platform_interaction/pubspec.yaml @@ -33,6 +33,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -62,6 +63,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -71,4 +73,4 @@ dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 5c71 +# PUBSPEC CHECKSUM: 3a76 diff --git a/dev/integration_tests/release_smoke_test/pubspec.yaml b/dev/integration_tests/release_smoke_test/pubspec.yaml index 2af4299cfaf..43d2f452d10 100644 --- a/dev/integration_tests/release_smoke_test/pubspec.yaml +++ b/dev/integration_tests/release_smoke_test/pubspec.yaml @@ -30,8 +30,10 @@ dev_dependencies: crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" file: 6.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -39,7 +41,8 @@ dev_dependencies: sync_http: 0.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" term_glyph: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: a26a +# PUBSPEC CHECKSUM: 6126 diff --git a/dev/integration_tests/ui/pubspec.yaml b/dev/integration_tests/ui/pubspec.yaml index ed411e258d7..60fdf1c68a2 100644 --- a/dev/integration_tests/ui/pubspec.yaml +++ b/dev/integration_tests/ui/pubspec.yaml @@ -34,6 +34,7 @@ dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -63,6 +64,7 @@ dependencies: typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -81,4 +83,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: 820c +# PUBSPEC CHECKSUM: 5e11 diff --git a/dev/integration_tests/ui/test_driver/license_check_test.dart b/dev/integration_tests/ui/test_driver/license_check_test.dart index 3e1fce9a315..38169a89c76 100644 --- a/dev/integration_tests/ui/test_driver/license_check_test.dart +++ b/dev/integration_tests/ui/test_driver/license_check_test.dart @@ -2,11 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'dart:async'; import 'dart:io'; import 'package:flutter_driver/flutter_driver.dart'; import 'package:path/path.dart' as path; import 'package:test/test.dart' hide TypeMatcher, isInstanceOf; +import 'package:vm_service_client/vm_service_client.dart'; // Connect and disconnect from the empty app. void main() { @@ -21,15 +23,19 @@ void main() { group('License file check', () { FlutterDriver driver; + IsolatesWorkaround workaround; setUpAll(() async { driver = await FlutterDriver.connect(); + workaround = IsolatesWorkaround(driver); + await workaround.resumeIsolates(); await driver.waitUntilFirstFrameRasterized(); }); tearDownAll(() async { if (driver != null) { await driver.close(); + await workaround.tearDown(); } }); @@ -51,3 +57,40 @@ void main() { }); }); } + +/// Workaround for isolates being paused by driver tests. +/// https://github.com/flutter/flutter/issues/24703 +class IsolatesWorkaround { + IsolatesWorkaround(this._driver); + + final FlutterDriver _driver; + StreamSubscription _streamSubscription; + + Future resumeIsolates() async { + final VM vm = await _driver.serviceClient.getVM(); + // Resume any paused isolate + for (final VMIsolateRef isolateRef in vm.isolates) { + final VMIsolate isolate = await isolateRef.load(); + if (isolate.isPaused) { + isolate.resume(); + } + } + if (_streamSubscription != null) { + return; + } + _streamSubscription = _driver.serviceClient.onIsolateRunnable + .asBroadcastStream() + .listen((VMIsolateRef isolateRef) async { + final VMIsolate isolate = await isolateRef.load(); + if (isolate.isPaused) { + isolate.resume(); + } + }); + } + + Future tearDown() async { + if (_streamSubscription != null) { + await _streamSubscription.cancel(); + } + } +} diff --git a/dev/integration_tests/web_e2e_tests/pubspec.yaml b/dev/integration_tests/web_e2e_tests/pubspec.yaml index 94d0f9fdf7a..9e114b7d27f 100644 --- a/dev/integration_tests/web_e2e_tests/pubspec.yaml +++ b/dev/integration_tests/web_e2e_tests/pubspec.yaml @@ -44,6 +44,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -70,10 +71,11 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 7093 +# PUBSPEC CHECKSUM: c598 diff --git a/examples/hello_world/pubspec.yaml b/examples/hello_world/pubspec.yaml index ae5037e3e0e..4a1887a3139 100644 --- a/examples/hello_world/pubspec.yaml +++ b/examples/hello_world/pubspec.yaml @@ -42,6 +42,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -68,10 +69,11 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: b4dc +# PUBSPEC CHECKSUM: a8e1 diff --git a/examples/platform_channel/pubspec.yaml b/examples/platform_channel/pubspec.yaml index 375e8a04bcb..7a7bd8189d8 100644 --- a/examples/platform_channel/pubspec.yaml +++ b/examples/platform_channel/pubspec.yaml @@ -42,6 +42,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -68,6 +69,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -77,4 +79,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b4dc +# PUBSPEC CHECKSUM: a8e1 diff --git a/examples/platform_channel_swift/pubspec.yaml b/examples/platform_channel_swift/pubspec.yaml index aea191f5807..dad11087cd4 100644 --- a/examples/platform_channel_swift/pubspec.yaml +++ b/examples/platform_channel_swift/pubspec.yaml @@ -42,6 +42,7 @@ dev_dependencies: http_parser: 3.1.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" io: 0.3.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" js: 0.6.3-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" logging: 0.11.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" mime: 0.9.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -68,6 +69,7 @@ dev_dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -77,4 +79,4 @@ dev_dependencies: flutter: uses-material-design: true -# PUBSPEC CHECKSUM: b4dc +# PUBSPEC CHECKSUM: a8e1 diff --git a/packages/_flutter_web_build_script/pubspec.yaml b/packages/_flutter_web_build_script/pubspec.yaml index 9b855f92007..c413170c5cd 100644 --- a/packages/_flutter_web_build_script/pubspec.yaml +++ b/packages/_flutter_web_build_script/pubspec.yaml @@ -66,7 +66,7 @@ dependencies: protobuf: 1.0.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pubspec_parse: 0.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - quiver: 2.1.4+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + quiver: 2.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" scratch_space: 0.0.4+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -93,4 +93,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: dce5 +# PUBSPEC CHECKSUM: 3d88 diff --git a/packages/flutter_driver/lib/src/driver/driver.dart b/packages/flutter_driver/lib/src/driver/driver.dart index b049ba5c5e3..1703b5e293b 100644 --- a/packages/flutter_driver/lib/src/driver/driver.dart +++ b/packages/flutter_driver/lib/src/driver/driver.dart @@ -6,8 +6,9 @@ import 'dart:io'; +import 'package:json_rpc_2/json_rpc_2.dart' as rpc; import 'package:meta/meta.dart'; -import 'package:vm_service/vm_service.dart' as vms; +import 'package:vm_service_client/vm_service_client.dart'; import 'package:webdriver/async_io.dart' as async_io; import '../common/diagnostics_tree.dart'; @@ -91,50 +92,53 @@ abstract class FlutterDriver { FlutterDriver(); /// Creates a driver that uses a connection provided by either the combination - /// of [webConnection], or the combination of [serviceClient] and [appIsolate] - /// for the VM. + /// of [webConnection], or the combination of [serviceClient], + /// [peer] and [appIsolate] @visibleForTesting factory FlutterDriver.connectedTo({ FlutterWebConnection webConnection, - vms.VmService serviceClient, - vms.Isolate appIsolate, + VMServiceClient serviceClient, + rpc.Peer peer, + VMIsolate appIsolate, }) { if (webConnection != null) { return WebFlutterDriver.connectedTo(webConnection); } - return VMServiceFlutterDriver.connectedTo(serviceClient, appIsolate); + return VMServiceFlutterDriver.connectedTo(serviceClient, peer, appIsolate); } /// Connects to a Flutter application. /// /// Resumes the application if it is currently paused (e.g. at a breakpoint). /// - /// The `dartVmServiceUrl` parameter is the URL to Dart observatory - /// (a.k.a. VM service). If not specified, the URL specified by the - /// `VM_SERVICE_URL` environment variable is used. One or the other must be - /// specified. + /// `dartVmServiceUrl` is the URL to Dart observatory (a.k.a. VM service). If + /// not specified, the URL specified by the `VM_SERVICE_URL` environment + /// variable is used. One or the other must be specified. /// - /// The `printCommunication` parameter determines whether the command - /// communication between the test and the app should be printed to stdout. + /// `printCommunication` determines whether the command communication between + /// the test and the app should be printed to stdout. /// - /// The `logCommunicationToFile` parameter determines whether the command - /// communication between the test and the app should be logged to - /// `flutter_driver_commands.log`. + /// `logCommunicationToFile` determines whether the command communication + /// between the test and the app should be logged to `flutter_driver_commands.log`. /// - /// The `isolateNumber` parameter determines the specific isolate to connect - /// to. If this is left as `null`, will connect to the first isolate found + /// `isolateNumber` determines the specific isolate to connect to. + /// If this is left as `null`, will connect to the first isolate found /// running on `dartVmServiceUrl`. /// - /// The `fuchsiaModuleTarget` parameter specifies the pattern for determining - /// which mod to control. When running on a Fuchsia device, either this or the - /// environment variable `FUCHSIA_MODULE_TARGET` must be set (the environment - /// variable is treated as a substring pattern). This field will be ignored if + /// `fuchsiaModuleTarget` specifies the pattern for determining which mod to + /// control. When running on a Fuchsia device, either this or the environment + /// variable `FUCHSIA_MODULE_TARGET` must be set (the environment variable is + /// treated as a substring pattern). This field will be ignored if /// `isolateNumber` is set, as this is already enough information to connect - /// to an isolate. This parameter is ignored on non-fuchsia devices. + /// to an isolate. /// - /// The `headers` parameter optionally specifies HTTP headers to be included - /// in the [WebSocket] connection. This is only used for - /// [VMServiceFlutterDriver] connections. + /// `headers` optionally specifies HTTP headers to be included in the + /// [WebSocket] connection. This is only used for [VMServiceFlutterDriver] + /// connections. + /// + /// `browser` specifies which FlutterDriver implementation to use. If not + /// speicifed or set to false, [VMServiceFlutterDriver] implementation + /// will be used. Otherwise, [WebFlutterDriver] implementation will be used. /// /// The return value is a future. This method never times out, though it may /// fail (completing with an error). A timeout can be applied by the caller @@ -152,20 +156,20 @@ abstract class FlutterDriver { return WebFlutterDriver.connectWeb(hostUrl: dartVmServiceUrl, timeout: timeout); } return VMServiceFlutterDriver.connect( - dartVmServiceUrl: dartVmServiceUrl, - printCommunication: printCommunication, - logCommunicationToFile: logCommunicationToFile, - isolateNumber: isolateNumber, - fuchsiaModuleTarget: fuchsiaModuleTarget, - headers: headers, + dartVmServiceUrl: dartVmServiceUrl, + printCommunication: printCommunication, + logCommunicationToFile: logCommunicationToFile, + isolateNumber: isolateNumber, + fuchsiaModuleTarget: fuchsiaModuleTarget, + headers: headers, ); } /// Getter of appIsolate. - vms.Isolate get appIsolate => throw UnimplementedError(); + VMIsolate get appIsolate => throw UnimplementedError(); /// Getter of serviceClient. - vms.VmService get serviceClient => throw UnimplementedError(); + VMServiceClient get serviceClient => throw UnimplementedError(); /// Getter of webDriver. async_io.WebDriver get webDriver => throw UnimplementedError(); diff --git a/packages/flutter_driver/lib/src/driver/vmservice_driver.dart b/packages/flutter_driver/lib/src/driver/vmservice_driver.dart index 6448d27bdc8..2074f7ee411 100644 --- a/packages/flutter_driver/lib/src/driver/vmservice_driver.dart +++ b/packages/flutter_driver/lib/src/driver/vmservice_driver.dart @@ -10,9 +10,11 @@ import 'dart:io'; import 'package:file/file.dart' as f; import 'package:fuchsia_remote_debug_protocol/fuchsia_remote_debug_protocol.dart' as fuchsia; +import 'package:json_rpc_2/json_rpc_2.dart' as rpc; import 'package:meta/meta.dart'; import 'package:path/path.dart' as p; -import 'package:vm_service/vm_service.dart' as vms; +import 'package:vm_service_client/vm_service_client.dart'; +import 'package:web_socket_channel/io.dart'; import 'package:webdriver/async_io.dart' as async_io; import '../../flutter_driver.dart'; @@ -27,15 +29,16 @@ import 'timeline.dart'; /// An implementation of the Flutter Driver over the vmservice protocol. class VMServiceFlutterDriver extends FlutterDriver { /// Creates a driver that uses a connection provided by the given - /// [serviceClient] and [appIsolate]. + /// [serviceClient], [_peer] and [appIsolate]. VMServiceFlutterDriver.connectedTo( - this._serviceClient, - this._appIsolate, { - bool printCommunication = false, - bool logCommunicationToFile = true, - }) : _printCommunication = printCommunication, - _logCommunicationToFile = logCommunicationToFile, - _driverId = _nextDriverId++; + this._serviceClient, + this._peer, + this._appIsolate, { + bool printCommunication = false, + bool logCommunicationToFile = true, + }) : _printCommunication = printCommunication, + _logCommunicationToFile = logCommunicationToFile, + _driverId = _nextDriverId++; /// Connects to a Flutter application. /// @@ -63,15 +66,14 @@ class VMServiceFlutterDriver extends FlutterDriver { if (fuchsiaModuleTarget == null) { throw DriverError( 'No Fuchsia module target has been specified.\n' - 'Please make sure to specify the FUCHSIA_MODULE_TARGET ' - 'environment variable.' + 'Please make sure to specify the FUCHSIA_MODULE_TARGET ' + 'environment variable.' ); } - final fuchsia.FuchsiaRemoteConnection fuchsiaConnection = await FuchsiaCompat.connect(); - final List refs = await fuchsiaConnection.getMainIsolatesByPattern(fuchsiaModuleTarget); - if (refs.isEmpty) { - throw DriverError('Failed to get any isolate refs!'); - } + final fuchsia.FuchsiaRemoteConnection fuchsiaConnection = + await FuchsiaCompat.connect(); + final List refs = + await fuchsiaConnection.getMainIsolatesByPattern(fuchsiaModuleTarget); final fuchsia.IsolateRef ref = refs.first; isolateNumber = ref.number; dartVmServiceUrl = ref.dartVm.uri.toString(); @@ -84,19 +86,21 @@ class VMServiceFlutterDriver extends FlutterDriver { if (dartVmServiceUrl == null) { throw DriverError( 'Could not determine URL to connect to application.\n' - 'Either the VM_SERVICE_URL environment variable should be set, or an explicit ' - 'URL should be provided to the FlutterDriver.connect() method.' + 'Either the VM_SERVICE_URL environment variable should be set, or an explicit ' + 'URL should be provided to the FlutterDriver.connect() method.' ); } // Connect to Dart VM services _log('Connecting to Flutter application at $dartVmServiceUrl'); - final vms.VmService client = await vmServiceConnectFunction(dartVmServiceUrl, headers); + final VMServiceClientConnection connection = + await vmServiceConnectFunction(dartVmServiceUrl, headers: headers); + final VMServiceClient client = connection.client; - Future _waitForRootIsolate() async { - bool _checkIsolate(vms.IsolateRef ref) => ref.number == isolateNumber.toString(); + Future _waitForRootIsolate() async { + bool _checkIsolate(VMIsolateRef ref) => ref.number == isolateNumber; while (true) { - final vms.VM vm = await client.getVM(); + final VM vm = await client.getVM(); if (vm.isolates.isEmpty || (isolateNumber != null && !vm.isolates.any(_checkIsolate))) { await Future.delayed(_kPauseBetweenReconnectAttempts); continue; @@ -107,7 +111,7 @@ class VMServiceFlutterDriver extends FlutterDriver { } } - final vms.IsolateRef isolateRef = await _warnIfSlow( + final VMIsolateRef isolateRef = await _warnIfSlow( future: _waitForRootIsolate(), timeout: kUnusuallyLongTimeout, message: isolateNumber == null @@ -115,42 +119,60 @@ class VMServiceFlutterDriver extends FlutterDriver { : 'Isolate $isolateNumber is taking an unusually long time to start.', ); _log('Isolate found with number: ${isolateRef.number}'); - vms.Isolate isolate = await client.getIsolate(isolateRef.id); - if (isolate.pauseEvent.kind == vms.EventKind.kNone) { - isolate = await client.getIsolate(isolateRef.id); + VMIsolate isolate = await isolateRef.loadRunnable(); + + // TODO(yjbanov): vm_service_client does not support "None" pause event yet. + // It is currently reported as null, but we cannot rely on it because + // eventually the event will be reported as a non-null object. For now, + // list all the events we know about. Later we'll check for "None" event + // explicitly. + // + // See: https://github.com/dart-lang/vm_service_client/issues/4 + if (isolate.pauseEvent is! VMPauseStartEvent && + isolate.pauseEvent is! VMPauseExitEvent && + isolate.pauseEvent is! VMPauseBreakpointEvent && + isolate.pauseEvent is! VMPauseExceptionEvent && + isolate.pauseEvent is! VMPauseInterruptedEvent && + isolate.pauseEvent is! VMResumeEvent) { + isolate = await isolateRef.loadRunnable(); } final VMServiceFlutterDriver driver = VMServiceFlutterDriver.connectedTo( - client, - isolate, + client, connection.peer, isolate, printCommunication: printCommunication, logCommunicationToFile: logCommunicationToFile, ); + driver._dartVmReconnectUrl = dartVmServiceUrl; + // Attempts to resume the isolate, but does not crash if it fails because // the isolate is already resumed. There could be a race with other tools, // such as a debugger, any of which could have resumed the isolate. - Future resumeLeniently() async { + Future resumeLeniently() async { _log('Attempting to resume isolate'); // Let subsequent isolates start automatically. try { - final vms.Response result = await client.setFlag('pause_isolates_on_start', 'false'); - if (result == null || result.type != 'Success') { + final Map result = + await connection.peer.sendRequest('setFlag', { + 'name': 'pause_isolates_on_start', + 'value': 'false', + }) as Map; + if (result == null || result['type'] != 'Success') { _log('setFlag failure: $result'); } } catch (e) { _log('Failed to set pause_isolates_on_start=false, proceeding. Error: $e'); } - return client.resume(isolate.id).catchError((dynamic e) { + return isolate.resume().catchError((dynamic e) { const int vmMustBePausedCode = 101; - if (e is vms.RPCError && e.code == vmMustBePausedCode) { + if (e is rpc.RpcException && e.code == vmMustBePausedCode) { // No biggie; something else must have resumed the isolate _log( 'Attempted to resume an already resumed isolate. This may happen ' - 'when another tool (usually a debugger) resumed the isolate ' - 'before the flutter_driver did.' + 'when we lose a race with another tool (usually a debugger) that ' + 'is connected to the same isolate.' ); } else { // Failed to resume due to another reason. Fail hard. @@ -164,12 +186,10 @@ class VMServiceFlutterDriver extends FlutterDriver { /// Looks at the list of loaded extensions for the current [isolateRef], as /// well as the stream of added extensions. Future waitForServiceExtension() async { - await client.streamListen(vms.EventStreams.kIsolate); - - final Future extensionAlreadyAdded = client - .getIsolate(isolateRef.id) - .then((vms.Isolate isolate) async { - if (isolate.extensionRPCs.contains(_flutterExtensionMethodName)) { + final Future extensionAlreadyAdded = isolateRef + .loadRunnable() + .then((VMIsolate isolate) async { + if (isolate.extensionRpcs.contains(_flutterExtensionMethodName)) { return; } // Never complete. Rely on the stream listener to find the service @@ -178,49 +198,60 @@ class VMServiceFlutterDriver extends FlutterDriver { }); final Completer extensionAdded = Completer(); - StreamSubscription isolateAddedSubscription; - - isolateAddedSubscription = client.onIsolateEvent.listen( - (vms.Event data) { - if (data.kind == vms.EventKind.kServiceExtensionAdded && data.extensionRPC == _flutterExtensionMethodName) { + StreamSubscription isolateAddedSubscription; + isolateAddedSubscription = isolate.onExtensionAdded.listen( + (String extensionName) { + if (extensionName == _flutterExtensionMethodName) { extensionAdded.complete(); isolateAddedSubscription.cancel(); } }, onError: extensionAdded.completeError, - cancelOnError: true, - ); + cancelOnError: true); await Future.any(>[ extensionAlreadyAdded, extensionAdded.future, ]); - await isolateAddedSubscription.cancel(); - await client.streamCancel(vms.EventStreams.kIsolate); + } + + /// Tells the Dart VM Service to notify us about "Isolate" events. + /// + /// This is a workaround for an issue in package:vm_service_client, which + /// subscribes to the "Isolate" stream lazily upon subscription, which + /// results in lost events. + /// + /// Details: https://github.com/dart-lang/vm_service_client/issues/17 + Future enableIsolateStreams() async { + await connection.peer.sendRequest('streamListen', { + 'streamId': 'Isolate', + }); } // Attempt to resume isolate if it was paused - if (isolate.pauseEvent.kind == vms.EventKind.kPauseStart) { + if (isolate.pauseEvent is VMPauseStartEvent) { _log('Isolate is paused at start.'); await resumeLeniently(); - } else if (isolate.pauseEvent.kind == vms.EventKind.kPauseExit || - isolate.pauseEvent.kind == vms.EventKind.kPauseBreakpoint || - isolate.pauseEvent.kind == vms.EventKind.kPauseException || - isolate.pauseEvent.kind == vms.EventKind.kPauseInterrupted) { + } else if (isolate.pauseEvent is VMPauseExitEvent || + isolate.pauseEvent is VMPauseBreakpointEvent || + isolate.pauseEvent is VMPauseExceptionEvent || + isolate.pauseEvent is VMPauseInterruptedEvent) { // If the isolate is paused for any other reason, assume the extension is // already there. _log('Isolate is paused mid-flight.'); await resumeLeniently(); - } else if (isolate.pauseEvent.kind == vms.EventKind.kResume) { + } else if (isolate.pauseEvent is VMResumeEvent) { _log('Isolate is not paused. Assuming application is ready.'); } else { _log( 'Unknown pause event type ${isolate.pauseEvent.runtimeType}. ' - 'Assuming application is ready.' + 'Assuming application is ready.' ); } + await enableIsolateStreams(); + // We will never receive the extension event if the user does not register // it. If that happens, show a message but continue waiting. await _warnIfSlow( @@ -234,8 +265,7 @@ class VMServiceFlutterDriver extends FlutterDriver { final Health health = await driver.checkHealth(); if (health.status != HealthStatus.ok) { - client.dispose(); - await client.onDone; + await client.close(); throw DriverError('Flutter application health check failed.'); } @@ -246,6 +276,9 @@ class VMServiceFlutterDriver extends FlutterDriver { static int _nextDriverId = 0; static const String _flutterExtensionMethodName = 'ext.flutter.driver'; + static const String _setVMTimelineFlagsMethodName = 'setVMTimelineFlags'; + static const String _getVMTimelineMethodName = 'getVMTimeline'; + static const String _clearVMTimelineMethodName = 'clearVMTimeline'; static const String _collectAllGarbageMethodName = '_collectAllGarbage'; // The additional blank line in the beginning is for _log. @@ -266,19 +299,42 @@ class VMServiceFlutterDriver extends FlutterDriver { /// The unique ID of this driver instance. final int _driverId; - @override - vms.Isolate get appIsolate => _appIsolate; - /// Client connected to the Dart VM running the Flutter application. /// /// You can use [VMServiceClient] to check VM version, flags and get /// notified when a new isolate has been instantiated. That could be /// useful if your application spawns multiple isolates that you /// would like to instrument. - final vms.VmService _serviceClient; + final VMServiceClient _serviceClient; + + /// JSON-RPC client useful for sending raw JSON requests. + rpc.Peer _peer; + + String _dartVmReconnectUrl; + + Future _restorePeerConnectionIfNeeded() async { + if (!_peer.isClosed || _dartVmReconnectUrl == null) { + return; + } + + _log( + 'Peer connection is closed! Trying to restore the connection...' + ); + + final String webSocketUrl = _getWebSocketUrl(_dartVmReconnectUrl); + final WebSocket ws = await WebSocket.connect(webSocketUrl); + ws.done.whenComplete(() => _checkCloseCode(ws)); + _peer = rpc.Peer( + IOWebSocketChannel(ws).cast(), + onUnhandledError: _unhandledJsonRpcError, + )..listen(); + } @override - vms.VmService get serviceClient => _serviceClient; + VMIsolate get appIsolate => _appIsolate; + + @override + VMServiceClient get serviceClient => _serviceClient; @override async_io.WebDriver get webDriver => throw UnsupportedError('VMServiceFlutterDriver does not support webDriver'); @@ -286,9 +342,9 @@ class VMServiceFlutterDriver extends FlutterDriver { /// The main isolate hosting the Flutter application. /// /// If you used the [registerExtension] API to instrument your application, - /// you can use this [vms.Isolate] to call these extension methods via + /// you can use this [VMIsolate] to call these extension methods via /// [invokeExtension]. - final vms.Isolate _appIsolate; + final VMIsolate _appIsolate; /// Whether to print communication between host and app to `stdout`. final bool _printCommunication; @@ -307,11 +363,10 @@ class VMServiceFlutterDriver extends FlutterDriver { try { final Map serialized = command.serialize(); _logCommunication('>>> $serialized'); - final Future> future = _serviceClient.callServiceExtension( + final Future> future = _appIsolate.invokeExtension( _flutterExtensionMethodName, - isolateId: _appIsolate.id, - args: serialized, - ).then>((vms.Response value) => value.json); + serialized, + ).then>((Object value) => value as Map); response = await _warnIfSlow>( future: future, timeout: command.timeout ?? kUnusuallyLongTimeout, @@ -344,20 +399,21 @@ class VMServiceFlutterDriver extends FlutterDriver { Future> screenshot() async { await Future.delayed(const Duration(seconds: 2)); - final vms.Response result = await _serviceClient.callMethod('_flutter.screenshot'); - return base64.decode(result.json['screenshot'] as String); + final Map result = await _peer.sendRequest('_flutter.screenshot') as Map; + return base64.decode(result['screenshot'] as String); } @override Future>> getVmFlags() async { - final vms.FlagList result = await _serviceClient.getFlagList(); + await _restorePeerConnectionIfNeeded(); + final Map result = await _peer.sendRequest('getFlagList') as Map; return result != null - ? result.flags.map((vms.Flag flag) => flag.toJson()).toList() + ? (result['flags'] as List).cast>() : const >[]; } - Future _getVMTimelineMicros() async { - return await _serviceClient.getVMTimelineMicros(); + Future> _getVMTimelineMicros() async { + return await _peer.sendRequest('getVMTimelineMicros') as Map; } @override @@ -368,10 +424,10 @@ class VMServiceFlutterDriver extends FlutterDriver { assert(streams != null && streams.isNotEmpty); assert(timeout != null); try { - await _warnIfSlow( - future: _serviceClient.setVMTimelineFlags( - _timelineStreamsToString(streams), - ), + await _warnIfSlow( + future: _peer.sendRequest(_setVMTimelineFlagsMethodName, { + 'recordedStreams': _timelineStreamsToString(streams), + }), timeout: timeout, message: 'VM is taking an unusually long time to respond to being told to start tracing...', ); @@ -395,27 +451,26 @@ class VMServiceFlutterDriver extends FlutterDriver { (startTime != null && endTime != null)); try { - await _warnIfSlow( - future: _serviceClient.setVMTimelineFlags(const []), + await _warnIfSlow( + future: _peer.sendRequest(_setVMTimelineFlagsMethodName, {'recordedStreams': '[]'}), timeout: timeout, message: 'VM is taking an unusually long time to respond to being told to stop tracing...', ); if (startTime == null) { - final vms.Timeline timeline = await _serviceClient.getVMTimeline(); - return Timeline.fromJson(timeline.json); + return Timeline.fromJson(await _peer.sendRequest(_getVMTimelineMethodName) as Map); } const int kSecondInMicros = 1000000; int currentStart = startTime; int currentEnd = startTime + kSecondInMicros; // 1 second of timeline final List> chunks = >[]; do { - final vms.Timeline chunk = await _serviceClient.getVMTimeline( - timeOriginMicros: currentStart, + final Map chunk = await _peer.sendRequest(_getVMTimelineMethodName, { + 'timeOriginMicros': currentStart, // The range is inclusive, avoid double counting on the chance something // aligns on the boundary. - timeExtentMicros: kSecondInMicros - 1, - ); - chunks.add(chunk.json); + 'timeExtentMicros': kSecondInMicros - 1, + }) as Map; + chunks.add(chunk); currentStart = currentEnd; currentEnd += kSecondInMicros; } while (currentStart < endTime); @@ -463,18 +518,18 @@ class VMServiceFlutterDriver extends FlutterDriver { await clearTimeline(); - final vms.Timestamp startTimestamp = await _getVMTimelineMicros(); + final Map startTimestamp = await _getVMTimelineMicros(); await startTracing(streams: streams); await action(); - final vms.Timestamp endTimestamp = await _getVMTimelineMicros(); + final Map endTimestamp = await _getVMTimelineMicros(); if (!(await _isPrecompiledMode())) { _log(_kDebugWarning); } return stopTracingAndDownloadTimeline( - startTime: startTimestamp.timestamp, - endTime: endTimestamp.timestamp, + startTime: startTimestamp['timestamp'] as int, + endTime: endTimestamp['timestamp'] as int, ); } @@ -484,8 +539,8 @@ class VMServiceFlutterDriver extends FlutterDriver { }) async { assert(timeout != null); try { - await _warnIfSlow( - future: _serviceClient.clearVMTimeline(), + await _warnIfSlow( + future: _peer.sendRequest(_clearVMTimelineMethodName, {}), timeout: timeout, message: 'VM is taking an unusually long time to respond to being told to clear its timeline buffer...', ); @@ -513,7 +568,10 @@ class VMServiceFlutterDriver extends FlutterDriver { @override Future forceGC() async { try { - await _serviceClient.callMethod(_collectAllGarbageMethodName, isolateId: _appIsolate.id); + await _peer + .sendRequest(_collectAllGarbageMethodName, { + 'isolateId': 'isolates/${_appIsolate.numberAsString}', + }); } catch (error, stackTrace) { throw DriverError( 'Failed to force a GC due to remote error', @@ -525,8 +583,9 @@ class VMServiceFlutterDriver extends FlutterDriver { @override Future close() async { - _serviceClient.dispose(); - await _serviceClient.onDone; + // Don't leak vm_service_client-specific objects, if any + await _serviceClient.close(); + await _peer.close(); } } @@ -542,6 +601,40 @@ void restoreVmServiceConnectFunction() { vmServiceConnectFunction = _waitAndConnect; } +/// The JSON RPC 2 spec says that a notification from a client must not respond +/// to the client. It's possible the client sent a notification as a "ping", but +/// the service isn't set up yet to respond. +/// +/// For example, if the client sends a notification message to the server for +/// 'streamNotify', but the server has not finished loading, it will throw an +/// exception. Since the message is a notification, the server follows the +/// specification and does not send a response back, but is left with an +/// unhandled exception. That exception is safe for us to ignore - the client +/// is signaling that it will try again later if it doesn't get what it wants +/// here by sending a notification. +// This may be ignoring too many exceptions. It would be best to rewrite +// the client code to not use notifications so that it gets error replies back +// and can decide what to do from there. +// TODO(dnfield): https://github.com/flutter/flutter/issues/31813 +bool _ignoreRpcError(dynamic error) { + if (error is rpc.RpcException) { + final rpc.RpcException exception = error; + return exception.data == null || exception.data['id'] == null; + } else if (error is String && error.startsWith('JSON-RPC error -32601')) { + return true; + } + return false; +} + +void _unhandledJsonRpcError(dynamic error, dynamic stack) { + if (_ignoreRpcError(error)) { + return; + } + _log('Unhandled RPC error:\n$error\n$stack'); + // TODO(dnfield): https://github.com/flutter/flutter/issues/31813 + // assert(false); +} + String _getWebSocketUrl(String url) { Uri uri = Uri.parse(url); final List pathSegments = [ @@ -554,30 +647,40 @@ String _getWebSocketUrl(String url) { return uri.toString(); } +void _checkCloseCode(WebSocket ws) { + if (ws.closeCode != 1000 && ws.closeCode != null) { + _log('$ws is closed with an unexpected code ${ws.closeCode}'); + } +} + /// Waits for a real Dart VM service to become available, then connects using /// the [VMServiceClient]. -Future _waitAndConnect(String url, Map headers) async { +Future _waitAndConnect( + String url, {Map headers}) async { final String webSocketUrl = _getWebSocketUrl(url); int attempts = 0; while (true) { + WebSocket ws1; + WebSocket ws2; try { - final WebSocket socket = await WebSocket.connect(webSocketUrl, headers: headers); - final vms.VmService service = vms.VmService( - socket, - socket.add, - log: null, - disposeHandler: () async { - await socket.close(); - }, + ws1 = await WebSocket.connect(webSocketUrl, headers: headers); + ws2 = await WebSocket.connect(webSocketUrl, headers: headers); + + ws1.done.whenComplete(() => _checkCloseCode(ws1)); + ws2.done.whenComplete(() => _checkCloseCode(ws2)); + + return VMServiceClientConnection( + VMServiceClient(IOWebSocketChannel(ws1).cast()), + rpc.Peer( + IOWebSocketChannel(ws2).cast(), + onUnhandledError: _unhandledJsonRpcError, + )..listen(), ); - // This call is to ensure we are able to establish a connection instead of - // keeping on trucking and failing farther down the process. - await service.getVersion(); - return service; } catch (e) { - if (attempts > 5) { + await ws1?.close(); + await ws2?.close(); + if (attempts > 5) _log('It is taking an unusually long time to connect to the VM...'); - } attempts += 1; await Future.delayed(_kPauseBetweenReconnectAttempts); } @@ -591,8 +694,8 @@ const Duration _kPauseBetweenReconnectAttempts = Duration(seconds: 1); // See `timeline_streams` in // https://github.com/dart-lang/sdk/blob/master/runtime/vm/timeline.cc -List _timelineStreamsToString(List streams) { - return streams.map((TimelineStream stream) { +String _timelineStreamsToString(List streams) { + final String contents = streams.map((TimelineStream stream) { switch (stream) { case TimelineStream.all: return 'all'; case TimelineStream.api: return 'API'; @@ -607,7 +710,8 @@ List _timelineStreamsToString(List streams) { default: throw 'Unknown timeline stream $stream'; } - }).toList(); + }).join(', '); + return '[$contents]'; } void _log(String message) { @@ -632,5 +736,24 @@ Future _warnIfSlow({ return future; } -/// A function that connects to a Dart VM service given the `url` and `headers`. -typedef VMServiceConnectFunction = Future Function(String url, Map headers); +/// Encapsulates connection information to an instance of a Flutter application. +@visibleForTesting +class VMServiceClientConnection { + /// Creates an instance of this class given a [client] and a [peer]. + VMServiceClientConnection(this.client, this.peer); + + /// Use this for structured access to the VM service's public APIs. + final VMServiceClient client; + + /// Use this to make arbitrary raw JSON-RPC calls. + /// + /// This object allows reaching into private VM service APIs. Use with + /// caution. + final rpc.Peer peer; +} + +/// A function that connects to a Dart VM service +/// with [headers] given the [url]. +typedef VMServiceConnectFunction = + Future Function( + String url, {Map headers}); diff --git a/packages/flutter_driver/lib/src/driver/web_driver.dart b/packages/flutter_driver/lib/src/driver/web_driver.dart index 2126b75e3ed..961cb172cc9 100644 --- a/packages/flutter_driver/lib/src/driver/web_driver.dart +++ b/packages/flutter_driver/lib/src/driver/web_driver.dart @@ -9,7 +9,7 @@ import 'dart:io'; import 'package:matcher/matcher.dart'; import 'package:meta/meta.dart'; -import 'package:vm_service/vm_service.dart' as vms; +import 'package:vm_service_client/vm_service_client.dart'; import 'package:webdriver/async_io.dart' as async_io; import 'package:webdriver/support/async.dart'; @@ -38,10 +38,10 @@ class WebFlutterDriver extends FlutterDriver { DateTime get startTime => _startTime; @override - vms.Isolate get appIsolate => throw UnsupportedError('WebFlutterDriver does not support appIsolate'); + VMIsolate get appIsolate => throw UnsupportedError('WebFlutterDriver does not support appIsolate'); @override - vms.VmService get serviceClient => throw UnsupportedError('WebFlutterDriver does not support serviceClient'); + VMServiceClient get serviceClient => throw UnsupportedError('WebFlutterDriver does not support serviceClient'); @override async_io.WebDriver get webDriver => _connection._driver; diff --git a/packages/flutter_driver/pubspec.yaml b/packages/flutter_driver/pubspec.yaml index 0988e0e36aa..dbff898a16c 100644 --- a/packages/flutter_driver/pubspec.yaml +++ b/packages/flutter_driver/pubspec.yaml @@ -9,9 +9,11 @@ environment: dependencies: file: 6.0.0-nullsafety.3 + json_rpc_2: 2.2.2 meta: 1.3.0-nullsafety.5 path: 1.8.0-nullsafety.2 - vm_service: 4.2.0 + web_socket_channel: 1.1.0 + vm_service_client: 0.2.6+2 webdriver: 2.1.2 flutter: sdk: flutter @@ -31,10 +33,10 @@ dependencies: convert: 2.1.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" crypto: 2.1.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" fake_async: 1.2.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - json_rpc_2: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" matcher: 0.12.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" process: 4.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -44,9 +46,9 @@ dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - web_socket_channel: 1.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: - quiver: 2.1.4+1 + mockito: 4.1.1 + quiver: 2.1.3 -# PUBSPEC CHECKSUM: 23ae +# PUBSPEC CHECKSUM: 9a64 diff --git a/packages/flutter_driver/test/common.dart b/packages/flutter_driver/test/common.dart index 70b555d9df7..8e7845825a8 100644 --- a/packages/flutter_driver/test/common.dart +++ b/packages/flutter_driver/test/common.dart @@ -11,7 +11,6 @@ import 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf; // ignor import 'package:test_api/test_api.dart' as test_package show TypeMatcher; // ignore: deprecated_member_use export 'package:test_api/test_api.dart' hide TypeMatcher, isInstanceOf; // ignore: deprecated_member_use -export 'package:test_api/fake.dart'; // ignore: deprecated_member_use // Defines a 'package:test' shim. // TODO(ianh): Clean this up once https://github.com/dart-lang/matcher/issues/98 is fixed @@ -32,6 +31,3 @@ void tryToDelete(Directory directory) { /// Matcher for functions that throw [DriverError]. final Matcher throwsDriverError = throwsA(isA()); - -/// Matcher for functions that throw [AssertionError]. -final Matcher throwsAssertionError = throwsA(isA()); diff --git a/packages/flutter_driver/test/flutter_driver_test.dart b/packages/flutter_driver/test/flutter_driver_test.dart index 59db708fd68..9fcd8b58033 100644 --- a/packages/flutter_driver/test/flutter_driver_test.dart +++ b/packages/flutter_driver/test/flutter_driver_test.dart @@ -13,7 +13,9 @@ import 'package:flutter_driver/src/common/layer_tree.dart'; import 'package:flutter_driver/src/common/wait.dart'; import 'package:flutter_driver/src/driver/driver.dart'; import 'package:flutter_driver/src/driver/timeline.dart'; -import 'package:vm_service/vm_service.dart' as vms; +import 'package:json_rpc_2/json_rpc_2.dart' as rpc; +import 'package:mockito/mockito.dart'; +import 'package:vm_service_client/vm_service_client.dart'; import 'package:quiver/testing/async.dart'; import 'common.dart'; @@ -31,9 +33,10 @@ void main() { }; group('VMServiceFlutterDriver.connect', () { - FakeVmService fakeClient; - FakeVM fakeVM; - FakeIsolate fakeIsolate; + MockVMServiceClient mockClient; + MockVM mockVM; + MockIsolate mockIsolate; + MockPeer mockPeer; void expectLogContains(String message) { expect(log, anyElement(contains(message))); @@ -41,92 +44,65 @@ void main() { setUp(() { log.clear(); - fakeIsolate = FakeIsolate(); - fakeVM = FakeVM(fakeIsolate); - fakeClient = FakeVmService(fakeVM); - vmServiceConnectFunction = (String url, Map headers) async { - return fakeClient; + mockClient = MockVMServiceClient(); + mockVM = MockVM(); + mockIsolate = MockIsolate(); + mockPeer = MockPeer(); + when(mockClient.getVM()).thenAnswer((_) => Future.value(mockVM)); + when(mockVM.isolates).thenReturn([mockIsolate]); + when(mockIsolate.loadRunnable()).thenAnswer((_) => Future.value(mockIsolate)); + when(mockIsolate.extensionRpcs).thenReturn([]); + when(mockIsolate.onExtensionAdded).thenAnswer((Invocation invocation) { + return Stream.fromIterable(['ext.flutter.driver']); + }); + when(mockIsolate.invokeExtension(any, any)).thenAnswer( + (Invocation invocation) => makeMockResponse({'status': 'ok'})); + vmServiceConnectFunction = (String url, {Map headers}) { + return Future.value( + VMServiceClientConnection(mockClient, mockPeer) + ); }; - fakeClient.responses['get_health'] = makeFakeResponse({'status': 'ok'}); }); tearDown(() async { restoreVmServiceConnectFunction(); }); - - test('throws after retries if no isolate', () async { - fakeVM.numberOfTriesBeforeResolvingIsolate = 10000; - FakeAsync().run((FakeAsync time) { - FlutterDriver.connect(dartVmServiceUrl: ''); - time.elapse(kUnusuallyLongTimeout); - }); - expect(log, [ - 'VMServiceFlutterDriver: Connecting to Flutter application at ', - 'VMServiceFlutterDriver: The root isolate is taking an unuusally long time to start.', - ]); - }); - - test('Retries connections if isolate is not available', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseStart, timestamp: 0); - fakeVM.numberOfTriesBeforeResolvingIsolate = 5; - final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); - expect(driver, isNotNull); - expect( - fakeClient.connectionLog, - [ - 'getIsolate', - 'setFlag pause_isolates_on_start false', - 'resume', - 'streamListen Isolate', - 'getIsolate', - 'onIsolateEvent', - 'streamCancel Isolate', - ], - ); - }); - - test('Connects to isolate number', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseStart, timestamp: 0); - final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: '', isolateNumber: int.parse(fakeIsolate.number)); - expect(driver, isNotNull); - expect( - fakeClient.connectionLog, - [ - 'getIsolate', - 'setFlag pause_isolates_on_start false', - 'resume', - 'streamListen Isolate', - 'getIsolate', - 'onIsolateEvent', - 'streamCancel Isolate', - ], - ); - }); - test('connects to isolate paused at start', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseStart, timestamp: 0); + final List connectionLog = []; + when(mockPeer.sendRequest('streamListen', any)).thenAnswer((Invocation invocation) { + connectionLog.add('streamListen'); + return null; + }); + when(mockPeer.sendRequest('setFlag', any)).thenAnswer((Invocation invocation) { + connectionLog.add('setFlag'); + return null; + }); + when(mockIsolate.pauseEvent).thenReturn(MockVMPauseStartEvent()); + when(mockIsolate.resume()).thenAnswer((Invocation invocation) { + connectionLog.add('resume'); + return Future.value(null); + }); + when(mockIsolate.onExtensionAdded).thenAnswer((Invocation invocation) { + connectionLog.add('onExtensionAdded'); + return Stream.fromIterable(['ext.flutter.driver']); + }); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expect(driver, isNotNull); expectLogContains('Isolate is paused at start'); - expect( - fakeClient.connectionLog, - [ - 'getIsolate', - 'setFlag pause_isolates_on_start false', - 'resume', - 'streamListen Isolate', - 'getIsolate', - 'onIsolateEvent', - 'streamCancel Isolate', - ], - ); + expect(connectionLog, ['setFlag', 'resume', 'streamListen', 'onExtensionAdded']); }); test('ignores setFlag failure', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseStart, timestamp: 0); - fakeClient.failOnSetFlag = true; + when(mockPeer.sendRequest('setFlag', any)).thenThrow(Exception('setFlag failed')); + when(mockIsolate.pauseEvent).thenReturn(MockVMPauseStartEvent()); + when(mockIsolate.resume()).thenAnswer((Invocation invocation) { + return Future.value(null); + }); + when(mockIsolate.onExtensionAdded).thenAnswer((Invocation invocation) { + return Stream.fromIterable(['ext.flutter.driver']); + }); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expectLogContains('Failed to set pause_isolates_on_start=false, proceeding. ' @@ -136,7 +112,8 @@ void main() { test('connects to isolate paused mid-flight', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseBreakpoint, timestamp: 0); + when(mockIsolate.pauseEvent).thenReturn(MockVMPauseBreakpointEvent()); + when(mockIsolate.resume()).thenAnswer((Invocation invocation) => Future.value(null)); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expect(driver, isNotNull); @@ -148,8 +125,12 @@ void main() { // we do. There's no need to fail as we should be able to drive the app // just fine. test('connects despite losing the race to resume isolate', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kPauseBreakpoint, timestamp: 0); - fakeClient.failOnResumeWith101 = true; + when(mockIsolate.pauseEvent).thenReturn(MockVMPauseBreakpointEvent()); + when(mockIsolate.resume()).thenAnswer((Invocation invocation) { + // This needs to be wrapped in a closure to not be considered uncaught + // by package:test + return Future.error(rpc.RpcException(101, '')); + }); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expect(driver, isNotNull); @@ -157,8 +138,7 @@ void main() { }); test('connects to unpaused isolate', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kResume, timestamp: 0); - + when(mockIsolate.pauseEvent).thenReturn(MockVMResumeEvent()); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expect(driver, isNotNull); expectLogContains('Isolate is not paused. Assuming application is ready.'); @@ -166,38 +146,56 @@ void main() { test('connects to unpaused when onExtensionAdded does not contain the ' 'driver extension', () async { - fakeIsolate.pauseEvent = vms.Event(kind: vms.EventKind.kResume, timestamp: 0); - fakeIsolate.extensionRPCs.add('ext.flutter.driver'); - + when(mockIsolate.pauseEvent).thenReturn(MockVMResumeEvent()); + when(mockIsolate.extensionRpcs).thenReturn(['ext.flutter.driver']); + when(mockIsolate.onExtensionAdded).thenAnswer((Invocation invocation) { + return const Stream.empty(); + }); final FlutterDriver driver = await FlutterDriver.connect(dartVmServiceUrl: ''); expect(driver, isNotNull); expectLogContains('Isolate is not paused. Assuming application is ready.'); }); + + test('connects with headers', () async { + Map actualHeaders; + vmServiceConnectFunction = (String url, {Map headers}) { + actualHeaders = headers; + return Future.value( + VMServiceClientConnection(mockClient, mockPeer) + ); + }; + + final Map expectedHeaders = {'header-key': 'header-value'}; + final FlutterDriver driver = await FlutterDriver.connect( + dartVmServiceUrl: '', headers: expectedHeaders); + expect(driver, isNotNull); + expect(actualHeaders, equals(expectedHeaders)); + }); }); group('VMServiceFlutterDriver', () { - FakeVmService fakeClient; - FakeVM fakeVM; - FakeIsolate fakeIsolate; + MockVMServiceClient mockClient; + MockPeer mockPeer; + MockIsolate mockIsolate; VMServiceFlutterDriver driver; setUp(() { - fakeIsolate = FakeIsolate(); - fakeVM = FakeVM(fakeIsolate); - fakeClient = FakeVmService(fakeVM); - driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate); - fakeClient.responses['tap'] = makeFakeResponse({}); + mockClient = MockVMServiceClient(); + mockPeer = MockPeer(); + mockIsolate = MockIsolate(); + driver = VMServiceFlutterDriver.connectedTo(mockClient, mockPeer, mockIsolate); }); test('checks the health of the driver extension', () async { - fakeClient.responses['get_health'] = makeFakeResponse({'status': 'ok'}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer( + (Invocation invocation) => makeMockResponse({'status': 'ok'})); final Health result = await driver.checkHealth(); expect(result.status, HealthStatus.ok); }); test('closes connection', () async { + when(mockClient.close()).thenAnswer((Invocation invocation) => Future.value(null)); await driver.close(); - expect(fakeClient.connectionLog.last, 'dispose'); }); group('ByValueKey', () { @@ -206,281 +204,482 @@ void main() { }); test('finds by ValueKey', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': 'foo', + 'keyValueType': 'String', + }); + return makeMockResponse({}); + }); await driver.tap(find.byValueKey('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: tap, timeout: $_kSerializedTestTimeout, finderType: ByValueKey, keyValueString: foo, keyValueType: String}', - ]); }); }); group('BySemanticsLabel', () { test('finds by Semantic label using String', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'BySemanticsLabel', + 'label': 'foo', + }); + return makeMockResponse({}); + }); await driver.tap(find.bySemanticsLabel('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: tap, timeout: $_kSerializedTestTimeout, finderType: BySemanticsLabel, label: foo}', - ]); }); test('finds by Semantic label using RegExp', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'BySemanticsLabel', + 'label': '^foo', + 'isRegExp': 'true', + }); + return makeMockResponse({}); + }); await driver.tap(find.bySemanticsLabel(RegExp('^foo')), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: tap, timeout: $_kSerializedTestTimeout, finderType: BySemanticsLabel, label: ^foo, isRegExp: true}', - ]); }); }); group('tap', () { test('requires a target reference', () async { - expect(driver.tap(null), throwsAssertionError); + expect(driver.tap(null), throwsDriverError); }); test('sends the tap command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByText', + 'text': 'foo', + }); + return makeMockResponse({}); + }); await driver.tap(find.text('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: tap, timeout: $_kSerializedTestTimeout, finderType: ByText, text: foo}', - ]); }); }); group('getText', () { test('requires a target reference', () async { - expect(driver.getText(null), throwsAssertionError); + expect(driver.getText(null), throwsDriverError); }); test('sends the getText command', () async { - fakeClient.responses['get_text'] = makeFakeResponse({'text': 'hello'}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_text', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'text': 'hello', + }); + }); final String result = await driver.getText(find.byValueKey(123), timeout: _kTestTimeout); expect(result, 'hello'); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_text, timeout: $_kSerializedTestTimeout, finderType: ByValueKey, keyValueString: 123, keyValueType: int}', - ]); }); }); group('getLayerTree', () { test('sends the getLayerTree command', () async { - fakeClient.responses['get_layer_tree'] = makeFakeResponse({ - 'tree': 'hello', + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_layer_tree', + 'timeout': _kSerializedTestTimeout, + }); + return makeMockResponse({ + 'tree': 'hello', + }); }); final LayerTree result = await driver.getLayerTree(timeout: _kTestTimeout); final LayerTree referenceTree = LayerTree.fromJson({ 'tree': 'hello', }); expect(result.tree, referenceTree.tree); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_layer_tree, timeout: $_kSerializedTestTimeout}', - ]); }); }); group('waitFor', () { test('requires a target reference', () async { - expect(driver.waitFor(null), throwsAssertionError); + expect(driver.waitFor(null), throwsDriverError); }); test('sends the waitFor command', () async { - fakeClient.responses['waitFor'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitFor', + 'finderType': 'ByTooltipMessage', + 'text': 'foo', + 'timeout': _kSerializedTestTimeout, + }); + return makeMockResponse({}); + }); await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitFor, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo}', - ]); }); }); group('getWidgetDiagnostics', () { test('sends the getWidgetDiagnostics command', () async { - fakeClient.responses['get_diagnostics_tree'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_diagnostics_tree', + 'diagnosticsType': 'widget', + 'finderType': 'ByTooltipMessage', + 'text': 'foo', + 'includeProperties': 'true', + 'subtreeDepth': '0', + 'timeout': _kSerializedTestTimeout, + }); + return makeMockResponse({}); + }); await driver.getWidgetDiagnostics(find.byTooltip('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_diagnostics_tree, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo, subtreeDepth: 0, includeProperties: true, diagnosticsType: widget}', - ]); }); }); group('getRenderObjectDiagnostics', () { test('sends the getRenderObjectDiagnostics command', () async { - fakeClient.responses['get_diagnostics_tree'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_diagnostics_tree', + 'diagnosticsType': 'renderObject', + 'finderType': 'ByTooltipMessage', + 'text': 'foo', + 'includeProperties': 'true', + 'subtreeDepth': '0', + 'timeout': _kSerializedTestTimeout, + }); + return makeMockResponse({}); + }); await driver.getRenderObjectDiagnostics(find.byTooltip('foo'), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_diagnostics_tree, timeout: $_kSerializedTestTimeout, finderType: ByTooltipMessage, text: foo, subtreeDepth: 0, includeProperties: true, diagnosticsType: renderObject}', - ]); }); }); group('waitForCondition', () { test('sends the wait for NoPendingFrameCondition command', () async { - fakeClient.responses['waitForCondition'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoPendingFrameCondition', + }); + return makeMockResponse({}); + }); await driver.waitForCondition(const NoPendingFrame(), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitForCondition, timeout: $_kSerializedTestTimeout, conditionName: NoPendingFrameCondition}', - ]); }); test('sends the wait for NoPendingPlatformMessages command', () async { - fakeClient.responses['waitForCondition'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoPendingPlatformMessagesCondition', + }); + return makeMockResponse({}); + }); await driver.waitForCondition(const NoPendingPlatformMessages(), timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitForCondition, timeout: $_kSerializedTestTimeout, conditionName: NoPendingPlatformMessagesCondition}', - ]); }); test('sends the waitForCondition of combined conditions command', () async { - fakeClient.responses['waitForCondition'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'CombinedCondition', + 'conditions': '[{"conditionName":"NoPendingFrameCondition"},{"conditionName":"NoTransientCallbacksCondition"}]', + }); + return makeMockResponse({}); + }); const SerializableWaitCondition combinedCondition = CombinedCondition([NoPendingFrame(), NoTransientCallbacks()]); await driver.waitForCondition(combinedCondition, timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitForCondition, timeout: $_kSerializedTestTimeout, conditionName: CombinedCondition, conditions: [{"conditionName":"NoPendingFrameCondition"},{"conditionName":"NoTransientCallbacksCondition"}]}', - ]); }); }); group('waitUntilNoTransientCallbacks', () { test('sends the waitUntilNoTransientCallbacks command', () async { - fakeClient.responses['waitForCondition'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoTransientCallbacksCondition', + }); + return makeMockResponse({}); + }); await driver.waitUntilNoTransientCallbacks(timeout: _kTestTimeout); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitForCondition, timeout: $_kSerializedTestTimeout, conditionName: NoTransientCallbacksCondition}', - ]); }); }); group('waitUntilFirstFrameRasterized', () { test('sends the waitUntilFirstFrameRasterized command', () async { - fakeClient.responses['waitForCondition'] = makeFakeResponse({}); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'waitForCondition', + 'conditionName': 'FirstFrameRasterizedCondition', + }); + return makeMockResponse({}); + }); await driver.waitUntilFirstFrameRasterized(); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: waitForCondition, conditionName: FirstFrameRasterizedCondition}', - ]); }); }); group('getOffset', () { - setUp(() { - fakeClient.responses['get_offset'] = makeFakeResponse({ - 'dx': 11, - 'dy': 12, - }); - }); - test('requires a target reference', () async { - expect(driver.getCenter(null), throwsAssertionError); - expect(driver.getTopLeft(null), throwsAssertionError); - expect(driver.getTopRight(null), throwsAssertionError); - expect(driver.getBottomLeft(null), throwsAssertionError); - expect(driver.getBottomRight(null), throwsAssertionError); + expect(driver.getCenter(null), throwsDriverError); + expect(driver.getTopLeft(null), throwsDriverError); + expect(driver.getTopRight(null), throwsDriverError); + expect(driver.getBottomLeft(null), throwsDriverError); + expect(driver.getBottomRight(null), throwsDriverError); }); test('sends the getCenter command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_offset', + 'offsetType': 'center', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'dx': 11, + 'dy': 12, + }); + }); final DriverOffset result = await driver.getCenter(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_offset, timeout: 1234, finderType: ByValueKey, keyValueString: 123, keyValueType: int, offsetType: center}', - ]); }); test('sends the getTopLeft command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_offset', + 'offsetType': 'topLeft', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'dx': 11, + 'dy': 12, + }); + }); final DriverOffset result = await driver.getTopLeft(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_offset, timeout: 1234, finderType: ByValueKey, keyValueString: 123, keyValueType: int, offsetType: topLeft}', - ]); }); test('sends the getTopRight command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_offset', + 'offsetType': 'topRight', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'dx': 11, + 'dy': 12, + }); + }); final DriverOffset result = await driver.getTopRight(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_offset, timeout: 1234, finderType: ByValueKey, keyValueString: 123, keyValueType: int, offsetType: topRight}', - ]); }); test('sends the getBottomLeft command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_offset', + 'offsetType': 'bottomLeft', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'dx': 11, + 'dy': 12, + }); + }); final DriverOffset result = await driver.getBottomLeft(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_offset, timeout: 1234, finderType: ByValueKey, keyValueString: 123, keyValueType: int, offsetType: bottomLeft}', - ]); }); test('sends the getBottomRight command', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_offset', + 'offsetType': 'bottomRight', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return makeMockResponse({ + 'dx': 11, + 'dy': 12, + }); + }); final DriverOffset result = await driver.getBottomRight(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeClient.commandLog, [ - 'ext.flutter.driver {command: get_offset, timeout: 1234, finderType: ByValueKey, keyValueString: 123, keyValueType: int, offsetType: bottomRight}', - ]); }); }); group('clearTimeline', () { test('clears timeline', () async { + bool clearWasCalled = false; + when(mockPeer.sendRequest('clearVMTimeline', argThat(equals({})))) + .thenAnswer((Invocation invocation) async { + clearWasCalled = true; + return null; + }); await driver.clearTimeline(); - expect(fakeClient.connectionLog, contains('clearVMTimeline')); + expect(clearWasCalled, isTrue); }); }); group('traceAction', () { + List log; + + setUp(() async { + log = []; + + when(mockPeer.sendRequest('clearVMTimeline', argThat(equals({})))) + .thenAnswer((Invocation invocation) async { + log.add('clear'); + return null; + }); + + when(mockPeer.sendRequest('getVMTimelineMicros')) + .thenAnswer((Invocation invocation) async { + log.add('getVMTimelineMicros'); + return {}; + }); + + when(mockPeer.sendRequest('setVMTimelineFlags', argThat(equals({'recordedStreams': '[all]'})))) + .thenAnswer((Invocation invocation) async { + log.add('startTracing'); + return null; + }); + + when(mockPeer.sendRequest('setVMTimelineFlags', argThat(equals({'recordedStreams': '[]'})))) + .thenAnswer((Invocation invocation) async { + log.add('stopTracing'); + return null; + }); + + when(mockPeer.sendRequest('getVMTimeline')).thenAnswer((Invocation invocation) async { + log.add('download'); + return { + 'traceEvents': [ + { + 'name': 'test event', + }, + ], + }; + }); + }); + test('without clearing timeline', () async { final Timeline timeline = await driver.traceAction(() async { - fakeClient.connectionLog.add('action'); + log.add('action'); }, retainPriorEvents: true); - expect(fakeClient.connectionLog, const [ - 'setVMTimelineFlags [all]', + expect(log, const [ + 'startTracing', 'action', - 'getFlagList', - 'setVMTimelineFlags []', - 'getVMTimeline null null', + 'stopTracing', + 'download', ]); expect(timeline.events.single.name, 'test event'); }); test('with clearing timeline', () async { final Timeline timeline = await driver.traceAction(() async { - fakeClient.connectionLog.add('action'); + log.add('action'); }); - expect(fakeClient.connectionLog, const [ - 'clearVMTimeline', + expect(log, const [ + 'clear', 'getVMTimelineMicros', - 'setVMTimelineFlags [all]', + 'startTracing', 'action', 'getVMTimelineMicros', - 'getFlagList', - 'setVMTimelineFlags []', - 'getVMTimeline 1 999999', + 'stopTracing', + 'download', ]); expect(timeline.events.single.name, 'test event'); }); test('with time interval', () async { - fakeClient.incrementMicros = true; - fakeClient.timelineResponses[1000001] = vms.Timeline.parse({ - 'traceEvents': [ - { - 'name': 'test event 2', - }, - ], + int count = 0; + when(mockPeer.sendRequest('getVMTimelineMicros')) + .thenAnswer((Invocation invocation) async { + log.add('getVMTimelineMicros'); + return { + if (count++ == 0) + 'timestamp': 0 + else + 'timestamp': 1000001, + }; + }); + when(mockPeer.sendRequest('getVMTimeline', argThat(equals({ + 'timeOriginMicros': 0, + 'timeExtentMicros': 999999 + })))) + .thenAnswer((Invocation invocation) async { + log.add('download 1'); + return { + 'traceEvents': [ + { + 'name': 'test event 1', + }, + ], + }; + }); + when(mockPeer.sendRequest('getVMTimeline', argThat(equals({ 'timeOriginMicros': 1000000, 'timeExtentMicros': 999999, - }); + })))) + .thenAnswer((Invocation invocation) async { + log.add('download 2'); + return { + 'traceEvents': [ + { + 'name': 'test event 2', + }, + ], + }; + }); + + final Timeline timeline = await driver.traceAction(() async { - fakeClient.connectionLog.add('action'); + log.add('action'); }); - expect(fakeClient.connectionLog, const [ - 'clearVMTimeline', + expect(log, const [ + 'clear', 'getVMTimelineMicros', - 'setVMTimelineFlags [all]', + 'startTracing', 'action', 'getVMTimelineMicros', - 'getFlagList', - 'setVMTimelineFlags []', - 'getVMTimeline 1 999999', - 'getVMTimeline 1000001 999999', + 'stopTracing', + 'download 1', + 'download 2', ]); expect(timeline.events.map((TimelineEvent event) => event.name), [ - 'test event', + 'test event 1', 'test event 2', ]); }); @@ -489,6 +688,36 @@ void main() { group('traceAction with timeline streams', () { test('specify non-default timeline streams', () async { bool actionCalled = false; + bool startTracingCalled = false; + bool stopTracingCalled = false; + + when(mockPeer.sendRequest('getVMTimelineMicros')) + .thenAnswer((Invocation invocation) async { + log.add('getVMTimelineMicros'); + return {}; + }); + + when(mockPeer.sendRequest('setVMTimelineFlags', argThat(equals({'recordedStreams': '[Dart, GC, Compiler]'})))) + .thenAnswer((Invocation invocation) async { + startTracingCalled = true; + return null; + }); + + when(mockPeer.sendRequest('setVMTimelineFlags', argThat(equals({'recordedStreams': '[]'})))) + .thenAnswer((Invocation invocation) async { + stopTracingCalled = true; + return null; + }); + + when(mockPeer.sendRequest('getVMTimeline')).thenAnswer((Invocation invocation) async { + return { + 'traceEvents': [ + { + 'name': 'test event', + }, + ], + }; + }); final Timeline timeline = await driver.traceAction(() async { actionCalled = true; @@ -501,13 +730,8 @@ void main() { retainPriorEvents: true); expect(actionCalled, isTrue); - expect(fakeClient.connectionLog, [ - 'setVMTimelineFlags [Dart, GC, Compiler]', - 'getFlagList', - 'setVMTimelineFlags []', - 'getVMTimeline null null' - ]); - + expect(startTracingCalled, isTrue); + expect(stopTracingCalled, isTrue); expect(timeline.events.single.name, 'test event'); }); }); @@ -515,7 +739,10 @@ void main() { group('sendCommand error conditions', () { test('local default timeout', () async { log.clear(); - fakeClient.artificialExtensionDelay = Completer().future; + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + // completer never completed to trigger timeout + return Completer>().future; + }); FakeAsync().run((FakeAsync time) { driver.waitFor(find.byTooltip('foo')); expect(log, []); @@ -526,7 +753,10 @@ void main() { test('local custom timeout', () async { log.clear(); - fakeClient.artificialExtensionDelay = Completer().future; + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + // completer never completed to trigger timeout + return Completer>().future; + }); FakeAsync().run((FakeAsync time) { final Duration customTimeout = kUnusuallyLongTimeout - const Duration(seconds: 1); driver.waitFor(find.byTooltip('foo'), timeout: customTimeout); @@ -537,9 +767,11 @@ void main() { }); test('remote error', () async { - fakeClient.responses['waitFor'] = makeFakeResponse({ - 'message': 'This is a failure', - }, isError: true); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + return makeMockResponse({ + 'message': 'This is a failure', + }, isError: true); + }); try { await driver.waitFor(find.byTooltip('foo')); fail('expected an exception'); @@ -550,9 +782,11 @@ void main() { }); test('uncaught remote error', () async { - fakeClient.artificialExtensionDelay = Future.error( - vms.RPCError('callServiceExtension', 9999, 'test error'), - ); + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + return Future>.error( + rpc.RpcException(9999, 'test error'), + ); + }); expect(driver.waitFor(find.byTooltip('foo')), throwsDriverError); }); @@ -570,47 +804,52 @@ void main() { }); group('VMServiceFlutterDriver with custom timeout', () { - FakeVmService fakeClient; - FakeVM fakeVM; - FakeIsolate fakeIsolate; + MockVMServiceClient mockClient; + MockPeer mockPeer; + MockIsolate mockIsolate; VMServiceFlutterDriver driver; setUp(() { - fakeIsolate = FakeIsolate(); - fakeVM = FakeVM(fakeIsolate); - fakeClient = FakeVmService(fakeVM); - driver = VMServiceFlutterDriver.connectedTo(fakeClient, fakeIsolate); - fakeClient.responses['get_health'] = makeFakeResponse({'status': 'ok'}); + mockClient = MockVMServiceClient(); + mockPeer = MockPeer(); + mockIsolate = MockIsolate(); + driver = VMServiceFlutterDriver.connectedTo(mockClient, mockPeer, mockIsolate); }); test('GetHealth has no default timeout', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_health', + }); + return makeMockResponse({'status': 'ok'}); + }); await driver.checkHealth(); - expect( - fakeClient.commandLog, - ['ext.flutter.driver {command: get_health}'], - ); }); test('does not interfere with explicit timeouts', () async { + when(mockIsolate.invokeExtension(any, any)).thenAnswer((Invocation i) { + expect(i.positionalArguments[1], { + 'command': 'get_health', + 'timeout': _kSerializedTestTimeout, + }); + return makeMockResponse({'status': 'ok'}); + }); await driver.checkHealth(timeout: _kTestTimeout); - expect( - fakeClient.commandLog, - ['ext.flutter.driver {command: get_health, timeout: $_kSerializedTestTimeout}'], - ); }); }); group('WebFlutterDriver', () { - FakeFlutterWebConnection fakeConnection; + MockFlutterWebConnection mockConnection; WebFlutterDriver driver; setUp(() { - fakeConnection = FakeFlutterWebConnection(); - fakeConnection.supportsTimelineAction = true; - driver = WebFlutterDriver.connectedTo(fakeConnection); + mockConnection = MockFlutterWebConnection(); + when(mockConnection.supportsTimelineAction).thenReturn(true); + driver = WebFlutterDriver.connectedTo(mockConnection); }); test('closes connection', () async { + when(mockConnection.close()).thenAnswer((Invocation invocation) => Future.value(null)); await driver.close(); }); @@ -621,177 +860,294 @@ void main() { }); test('finds by ValueKey', () async { - fakeConnection.responses['tap'] = jsonEncode(makeFakeResponse({})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': 'foo', + 'keyValueType': 'String', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.tap(find.byValueKey('foo'), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"tap","timeout":"1234","finderType":"ByValueKey","keyValueString":"foo","keyValueType":"String"}') 0:00:01.234000''', - ]); }); }); group('BySemanticsLabel', () { test('finds by Semantic label using String', () async { - fakeConnection.responses['tap'] = jsonEncode(makeFakeResponse({})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'BySemanticsLabel', + 'label': 'foo', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.tap(find.bySemanticsLabel('foo'), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"tap","timeout":"1234","finderType":"BySemanticsLabel","label":"foo"}') 0:00:01.234000''', - ]); }); test('finds by Semantic label using RegExp', () async { - fakeConnection.responses['tap'] = jsonEncode(makeFakeResponse({})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'BySemanticsLabel', + 'label': '^foo', + 'isRegExp': 'true', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.tap(find.bySemanticsLabel(RegExp('^foo')), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"tap","timeout":"1234","finderType":"BySemanticsLabel","label":"^foo","isRegExp":"true"}') 0:00:01.234000''', - ]); }); }); group('tap', () { test('requires a target reference', () async { - expect(driver.tap(null), throwsAssertionError); + expect(driver.tap(null), throwsDriverError); }); test('sends the tap command', () async { - fakeConnection.responses['tap'] = jsonEncode(makeFakeResponse({})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'tap', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByText', + 'text': 'foo', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.tap(find.text('foo'), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"tap","timeout":"1234","finderType":"ByText","text":"foo"}') 0:00:01.234000''', - ]); }); }); group('getText', () { test('requires a target reference', () async { - expect(driver.getText(null), throwsAssertionError); + expect(driver.getText(null), throwsDriverError); }); test('sends the getText command', () async { - fakeConnection.responses['get_text'] = jsonEncode(makeFakeResponse({'text': 'hello'})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_text', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'text': 'hello', + })); + }); final String result = await driver.getText(find.byValueKey(123), timeout: _kTestTimeout); expect(result, 'hello'); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_text","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int"}') 0:00:01.234000''', - ]); }); }); group('waitFor', () { test('requires a target reference', () async { - expect(driver.waitFor(null), throwsAssertionError); + expect(driver.waitFor(null), throwsDriverError); }); test('sends the waitFor command', () async { - fakeConnection.responses['waitFor'] = jsonEncode(makeFakeResponse({'text': 'hello'})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'waitFor', + 'finderType': 'ByTooltipMessage', + 'text': 'foo', + 'timeout': _kSerializedTestTimeout, + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.waitFor(find.byTooltip('foo'), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"waitFor","timeout":"1234","finderType":"ByTooltipMessage","text":"foo"}') 0:00:01.234000''', - ]); }); }); group('waitForCondition', () { - setUp(() { - fakeConnection.responses['waitForCondition'] = jsonEncode(makeFakeResponse({'text': 'hello'})); - }); - test('sends the wait for NoPendingFrameCondition command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoPendingFrameCondition', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.waitForCondition(const NoPendingFrame(), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"waitForCondition","timeout":"1234","conditionName":"NoPendingFrameCondition"}') 0:00:01.234000''', - ]); }); test('sends the wait for NoPendingPlatformMessages command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoPendingPlatformMessagesCondition', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.waitForCondition(const NoPendingPlatformMessages(), timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"waitForCondition","timeout":"1234","conditionName":"NoPendingPlatformMessagesCondition"}') 0:00:01.234000''', - ]); }); test('sends the waitForCondition of combined conditions command', () async { - const SerializableWaitCondition combinedCondition = CombinedCondition( - [NoPendingFrame(), NoTransientCallbacks()], - ); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'CombinedCondition', + 'conditions': '[{"conditionName":"NoPendingFrameCondition"},{"conditionName":"NoTransientCallbacksCondition"}]', + }); + return jsonEncode(await makeMockResponse({})); + }); + const SerializableWaitCondition combinedCondition = + CombinedCondition([NoPendingFrame(), NoTransientCallbacks()]); await driver.waitForCondition(combinedCondition, timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"waitForCondition","timeout":"1234","conditionName":"CombinedCondition","conditions":"[{\"conditionName\":\"NoPendingFrameCondition\"},{\"conditionName\":\"NoTransientCallbacksCondition\"}]"}') 0:00:01.234000''', - ]); }); }); group('waitUntilNoTransientCallbacks', () { test('sends the waitUntilNoTransientCallbacks command', () async { - fakeConnection.responses['waitForCondition'] = jsonEncode(makeFakeResponse({})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'waitForCondition', + 'timeout': _kSerializedTestTimeout, + 'conditionName': 'NoTransientCallbacksCondition', + }); + return jsonEncode(await makeMockResponse({})); + }); await driver.waitUntilNoTransientCallbacks(timeout: _kTestTimeout); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"waitForCondition","timeout":"1234","conditionName":"NoTransientCallbacksCondition"}') 0:00:01.234000''', - ]); }); }); group('getOffset', () { - setUp(() { - fakeConnection.responses['get_offset'] = jsonEncode(makeFakeResponse({ - 'dx': 11, - 'dy': 12, - })); - }); test('requires a target reference', () async { - expect(driver.getCenter(null), throwsAssertionError); - expect(driver.getTopLeft(null), throwsAssertionError); - expect(driver.getTopRight(null), throwsAssertionError); - expect(driver.getBottomLeft(null), throwsAssertionError); - expect(driver.getBottomRight(null), throwsAssertionError); + expect(driver.getCenter(null), throwsDriverError); + expect(driver.getTopLeft(null), throwsDriverError); + expect(driver.getTopRight(null), throwsDriverError); + expect(driver.getBottomLeft(null), throwsDriverError); + expect(driver.getBottomRight(null), throwsDriverError); }); test('sends the getCenter command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_offset', + 'offsetType': 'center', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'dx': 11, + 'dy': 12, + })); + }); final DriverOffset result = await driver.getCenter(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_offset","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int","offsetType":"center"}') 0:00:01.234000''', - ]); }); test('sends the getTopLeft command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_offset', + 'offsetType': 'topLeft', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'dx': 11, + 'dy': 12, + })); + }); final DriverOffset result = await driver.getTopLeft(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_offset","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int","offsetType":"topLeft"}') 0:00:01.234000''', - ]); }); test('sends the getTopRight command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_offset', + 'offsetType': 'topRight', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'dx': 11, + 'dy': 12, + })); + }); final DriverOffset result = await driver.getTopRight(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_offset","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int","offsetType":"topRight"}') 0:00:01.234000''', - ]); }); test('sends the getBottomLeft command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_offset', + 'offsetType': 'bottomLeft', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'dx': 11, + 'dy': 12, + })); + }); final DriverOffset result = await driver.getBottomLeft(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_offset","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int","offsetType":"bottomLeft"}') 0:00:01.234000''', - ]); }); test('sends the getBottomRight command', () async { + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_offset', + 'offsetType': 'bottomRight', + 'timeout': _kSerializedTestTimeout, + 'finderType': 'ByValueKey', + 'keyValueString': '123', + 'keyValueType': 'int', + }); + return jsonEncode(await makeMockResponse({ + 'dx': 11, + 'dy': 12, + })); + }); final DriverOffset result = await driver.getBottomRight(find.byValueKey(123), timeout: _kTestTimeout); expect(result, const DriverOffset(11, 12)); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_offset","timeout":"1234","finderType":"ByValueKey","keyValueString":"123","keyValueType":"int","offsetType":"bottomRight"}') 0:00:01.234000''', - ]); }); }); test('checks the health of the driver extension', () async { - fakeConnection.responses['get_health'] = jsonEncode(makeFakeResponse({'status': 'ok'})); + when(mockConnection.sendCommand(any, any)).thenAnswer((Invocation i) async { + final String script = _checkAndEncode(i.positionalArguments[0]); + expect(Map.from(jsonDecode(script) as Map), { + 'command': 'get_health', + }); + return jsonEncode(await makeMockResponse({'status': 'ok'})); + }); await driver.checkHealth(); - expect(fakeConnection.commandLog, [ - r'''window.$flutterDriver('{"command":"get_health"}') null''', - ]); }); group('WebFlutterDriver Unimplemented/Unsupported error', () { @@ -811,7 +1167,7 @@ void main() { }); test('appIsoloate', () async { - expect(() => driver.appIsolate.extensionRPCs, + expect(() => driver.appIsolate.invokeExtension('abc', {'abc': '123'}), throwsA(isA())); }); @@ -823,12 +1179,13 @@ void main() { }); group('WebFlutterDriver with non-chrome browser', () { - FakeFlutterWebConnection fakeConnection; + MockFlutterWebConnection mockConnection; WebFlutterDriver driver; setUp(() { - fakeConnection = FakeFlutterWebConnection(); - driver = WebFlutterDriver.connectedTo(fakeConnection); + mockConnection = MockFlutterWebConnection(); + when(mockConnection.supportsTimelineAction).thenReturn(false); + driver = WebFlutterDriver.connectedTo(mockConnection); }); test('tracing', () async { @@ -856,199 +1213,31 @@ String _checkAndEncode(dynamic script) { return script.substring(_kWebScriptPrefix.length, script.length - 2) as String; } -vms.Response makeFakeResponse( +Future> makeMockResponse( Map response, { bool isError = false, }) { - return vms.Response.parse({ + return Future>.value({ 'isError': isError, 'response': response, }); } -class FakeFlutterWebConnection extends Fake implements FlutterWebConnection { - @override - bool supportsTimelineAction = false; +class MockVMServiceClient extends Mock implements VMServiceClient { } - Map responses = {}; - List commandLog = []; - @override - Future sendCommand(String script, Duration duration) async { - commandLog.add('$script $duration'); - final Map decoded = jsonDecode(_checkAndEncode(script)) as Map; - final dynamic response = responses[decoded['command']]; - assert(response != null, 'Missing ${decoded['command']} in responses.'); - return response; - } +class MockVM extends Mock implements VM { } +class MockIsolate extends Mock implements VMRunnableIsolate { } + +class MockVMPauseStartEvent extends Mock implements VMPauseStartEvent { } + +class MockVMPauseBreakpointEvent extends Mock implements VMPauseBreakpointEvent { } + +class MockVMResumeEvent extends Mock implements VMResumeEvent { } + +class MockFlutterWebConnection extends Mock implements FlutterWebConnection { } + +class MockPeer extends Mock implements rpc.Peer { @override - Future close() async { - return; - } + bool get isClosed => false; } - -class FakeVmService extends Fake implements vms.VmService { - FakeVmService(this.vm); - - FakeVM vm; - bool failOnSetFlag = false; - bool failOnResumeWith101 = false; - - final List connectionLog = []; - - @override - Future getVM() async => vm; - - @override - Future getIsolate(String isolateId) async { - connectionLog.add('getIsolate'); - if (isolateId == vm.isolate.id) { - return vm.isolate; - } - return null; - } - - @override - Future resume(String isolateId, {String step, int frameIndex}) async { - assert(isolateId == vm.isolate.id); - connectionLog.add('resume'); - if (failOnResumeWith101) { - throw vms.RPCError('resume', 101, ''); - } - return vms.Success(); - } - - @override - Future streamListen(String streamId) async { - connectionLog.add('streamListen $streamId'); - return vms.Success(); - } - - @override - Future streamCancel(String streamId) async { - connectionLog.add('streamCancel $streamId'); - return vms.Success(); - } - - @override - Future setFlag(String name, String value) async { - connectionLog.add('setFlag $name $value'); - if (failOnSetFlag) { - throw Exception('setFlag failed'); - } - return vms.Success(); - } - - @override - Stream get onIsolateEvent async* { - connectionLog.add('onIsolateEvent'); - yield vms.Event( - kind: vms.EventKind.kServiceExtensionAdded, - extensionRPC: 'ext.flutter.driver', - timestamp: 0, - ); - } - - List commandLog = []; - Map responses = {}; - Future artificialExtensionDelay; - - @override - Future callServiceExtension(String method, {Map args, String isolateId}) async { - commandLog.add('$method $args'); - await artificialExtensionDelay; - - final vms.Response response = responses[args['command']]; - assert(response != null, 'Failed to create a response for ${args['command']}'); - return response; - } - - @override - Future clearVMTimeline() async { - connectionLog.add('clearVMTimeline'); - return vms.Success(); - } - - @override - Future getFlagList() async { - connectionLog.add('getFlagList'); - return vms.FlagList(flags: []); - } - - int vmTimelineMicros = -1000000; - bool incrementMicros = false; - - @override - Future getVMTimelineMicros() async { - connectionLog.add('getVMTimelineMicros'); - if (incrementMicros || vmTimelineMicros < 0) { - vmTimelineMicros = vmTimelineMicros + 1000001; - } - return vms.Timestamp(timestamp: vmTimelineMicros); - } - - @override - Future setVMTimelineFlags(List recordedStreams) async { - connectionLog.add('setVMTimelineFlags $recordedStreams'); - return vms.Success(); - } - - final Map timelineResponses = { - 1: vms.Timeline.parse({ - 'traceEvents': [ - { - 'name': 'test event', - }, - ], - 'timeOriginMicros': 0, - 'timeExtentMicros': 999999, - }), - }; - - @override - Future getVMTimeline({int timeOriginMicros, int timeExtentMicros}) async { - connectionLog.add('getVMTimeline $timeOriginMicros $timeExtentMicros'); - final vms.Timeline timeline = timelineResponses[timeOriginMicros ?? 1]; - assert(timeline != null, 'Missing entry in timelineResponses[$timeOriginMicros]'); - return timeline; - } - - @override - void dispose() { - connectionLog.add('dispose'); - } - - @override - Future get onDone async {} -} - -class FakeVM extends Fake implements vms.VM { - FakeVM(this.isolate); - - vms.Isolate isolate; - - int numberOfTriesBeforeResolvingIsolate = 0; - - @override - List get isolates { - numberOfTriesBeforeResolvingIsolate -= 1; - return [ - if (numberOfTriesBeforeResolvingIsolate <= 0) - isolate, - ]; - } -} - -class FakeIsolate extends Fake implements vms.Isolate { - @override - String get number => '123'; - - @override - String get id => number; - - @override - vms.Event pauseEvent; - - @override - List get extensionRPCs => []; -} \ No newline at end of file diff --git a/packages/flutter_driver/test/src/real_tests/find_test.dart b/packages/flutter_driver/test/src/real_tests/find_test.dart index 9f1c83712bb..fccf5b5c93f 100644 --- a/packages/flutter_driver/test/src/real_tests/find_test.dart +++ b/packages/flutter_driver/test/src/real_tests/find_test.dart @@ -7,11 +7,12 @@ import 'package:flutter_driver/driver_extension.dart'; import 'package:flutter_driver/flutter_driver.dart'; import 'package:flutter_driver/src/common/find.dart'; +import 'package:mockito/mockito.dart'; import '../../common.dart'; void main() { - final FakeDeserialize fakeDeserialize = FakeDeserialize(); + final MockDeserialize mockDeserialize = MockDeserialize(); test('Ancestor finder serialize', () { const SerializableFinder of = ByType('Text'); @@ -41,7 +42,7 @@ void main() { 'firstMatchOnly': 'true', }; - final Ancestor a = Ancestor.deserialize(serialized, fakeDeserialize); + final Ancestor a = Ancestor.deserialize(serialized, mockDeserialize); expect(a.of, isA()); expect(a.matching, isA()); expect(a.matchRoot, isTrue); @@ -76,7 +77,7 @@ void main() { 'firstMatchOnly': 'true', }; - final Descendant a = Descendant.deserialize(serialized, fakeDeserialize); + final Descendant a = Descendant.deserialize(serialized, mockDeserialize); expect(a.of, isA()); expect(a.matching, isA()); expect(a.matchRoot, isTrue); @@ -84,4 +85,4 @@ void main() { }); } -class FakeDeserialize extends Fake with DeserializeFinderFactory { } +class MockDeserialize with Mock, DeserializeFinderFactory { } diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml index fef79a26904..de1e2c474b2 100644 --- a/packages/flutter_tools/pubspec.yaml +++ b/packages/flutter_tools/pubspec.yaml @@ -85,7 +85,7 @@ dependencies: pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" petitparser: 3.1.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - quiver: 2.1.4+1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + quiver: 2.1.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_proxy: 0.1.0+7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -113,4 +113,4 @@ dartdoc: # Exclude this package from the hosted API docs. nodoc: true -# PUBSPEC CHECKSUM: 3206 +# PUBSPEC CHECKSUM: cda8 diff --git a/packages/fuchsia_remote_debug_protocol/pubspec.yaml b/packages/fuchsia_remote_debug_protocol/pubspec.yaml index 0017209579a..24c7f2ba1e7 100644 --- a/packages/fuchsia_remote_debug_protocol/pubspec.yaml +++ b/packages/fuchsia_remote_debug_protocol/pubspec.yaml @@ -32,6 +32,7 @@ dependencies: meta: 1.3.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" path: 1.8.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" platform: 3.0.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_span: 1.8.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stack_trace: 1.10.0-nullsafety.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" stream_channel: 2.1.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -41,7 +42,7 @@ dependencies: test_api: 0.2.19-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" typed_data: 1.3.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" vector_math: 2.1.0-nullsafety.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service_client: 0.2.6+2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webdriver: 2.1.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" dev_dependencies: @@ -67,7 +68,6 @@ dev_dependencies: package_config: 1.9.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pedantic: 1.10.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" pool: 1.5.0-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" - pub_semver: 1.4.4 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf: 0.7.5 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_packages_handler: 2.0.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" shelf_static: 0.2.8 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" @@ -75,8 +75,9 @@ dev_dependencies: source_map_stack_trace: 2.1.0-nullsafety.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" source_maps: 0.10.10-nullsafety.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" test_core: 0.3.12-nullsafety.7 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" + vm_service: 4.2.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" watcher: 0.9.7+15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" webkit_inspection_protocol: 0.7.3 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" yaml: 2.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade" -# PUBSPEC CHECKSUM: 81ce +# PUBSPEC CHECKSUM: 2393