flutter/packages/flutter_tools/test/web.shard
Jackson Gardner ba626dc83a
Wasm/JS Dual Compile with the flutter tool (#141396)
This implements dual compile via the newly available flutter.js bootstrapping APIs for intelligent build fallback.
* Users can now use the `FlutterLoader.load` API from flutter.js
* Flutter tool injects build info into the `index.html` of the user so that the bootstrapper knows which build variants are available to bootstrap
* The semantics of the `--wasm` flag for `flutter build web` have changed:
  - Instead of producing a separate `build/web_wasm` directory, the output goes to the `build/web` directory like a normal web build
  - Produces a dual build that contains two build variants: dart2wasm+skwasm and dart2js+CanvasKit. The dart2wasm+skwasm will only work on Chrome in a cross-origin isolated context, all other environments will fall back to dart2js+CanvasKit.
  - `--wasm` and `--web-renderer` are now mutually exclusive. Since there are multiple build variants with `--wasm`, the web renderer cannot be expressed via a single command-line flag. For now, we are hard coding what build variants are produced with the `--wasm` flag, but I plan on making this more customizable in the future.
* Build targets now can optionally provide a "build key" which can uniquely identify any specific parameterization of that build target. This way, the build target can invalidate itself by changing its build key. This works a bit better than just stuffing everything into the environment defines because (a) it doesn't invalidate the entire build, just the targets which are affected and (b) settings for multiple build variants don't translate well to the flat map of environment defines.
2024-02-02 01:52:28 +00:00
..
test_data Wasm/JS Dual Compile with the flutter tool (#141396) 2024-02-02 01:52:28 +00:00
chrome_test.dart [tool] fallback to sigkill when closing Chromium (#135521) 2023-09-28 22:28:31 +00:00
debugger_stepping_web_test.dart migrate web integration tests to null safety (#106231) 2022-06-21 11:19:09 -07:00
expression_evaluation_web_test.dart Temporarily remove a bogus warning until fixed by dwds update (#109793) 2022-08-19 11:06:53 -07:00
hot_reload_web_test.dart Wasm/JS Dual Compile with the flutter tool (#141396) 2024-02-02 01:52:28 +00:00
output_web_test.dart [flutter_tool] Delete skipped tests (#136364) 2023-10-11 10:24:14 -07:00
README.md Update usage of standalonepub executable in flutter_tools testing docs (#124898) 2023-04-17 23:34:23 +00:00
vm_service_web_test.dart Add vmservice for android build options (#123034) 2023-04-18 18:16:09 +00:00
web_driver_service_test.dart migrate web integration tests to null safety (#106231) 2022-06-21 11:19:09 -07:00
web_run_test.dart migrate web integration tests to null safety (#106231) 2022-06-21 11:19:09 -07:00

Web integration tests

These tests are not hermetic, and use the actual Flutter SDK. While they don't require actual devices, they run flutter_tester to test Dart web debug services (dwds) and Flutter integration.

Use this command to run (from the flutter_tools directory):

../../bin/cache/dart-sdk/bin/dart run test test/web.shard

These tests are expensive to run and do not give meaningful coverage information for the flutter tool (since they are black-box tests that run the tool as a subprocess, rather than being unit tests). For this reason, they are in a separate shard when running on continuous integration and are not run when calculating coverage.