Re-merge Switch web-render option default to auto. Add documentation (flutter/engine#23187)

This commit is contained in:
nturgut 2020-12-21 09:56:02 -08:00 committed by GitHub
parent 3eab887ae7
commit f357d3b5e5
3 changed files with 11 additions and 1 deletions

View File

@ -49,6 +49,8 @@ To run unit tests only:
felt test --unit-tests-only
```
Most of the unit tests are run using the html rendering backends. The unit tests under `test/cancaskit` directory use `canvaskit` backend.
To run integration tests only. For now these tests are only available on Chrome Desktop browsers. These tests will fetch the flutter repository for using `flutter drive` and `flutter pub get` commands. The repository will be synced to the youngest commit older than the engine commit.
```
@ -61,6 +63,12 @@ To skip cloning the flutter repository use the following flag. This flag can sav
felt test --integration-tests-only --use-system-flutter
```
We can use different rendering backends for running the integrations tests. If one wants to use html backend use the following command. `web-renderer` flag accepts 3 different options: `html`, `canvaskit`, `auto`.
```
felt test --integration-tests-only --web-renderer=html
```
To run tests on Firefox (this will work only on a Linux device):
```

View File

@ -619,6 +619,8 @@ class TestCommand extends Command<bool> with ArgUtils {
'--enable-experiment=non-nullable',
'--no-sound-null-safety',
if (input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=true',
if (!input.forCanvasKit) '-DFLUTTER_WEB_AUTO_DETECT=false',
if (!input.forCanvasKit) '-DFLUTTER_WEB_USE_SKIA=false',
'-O2',
'-o',
targetFileName, // target path.

View File

@ -31,7 +31,7 @@ bool _detectRenderer() {
/// Using flutter tools option "--web-render=auto" would set the value to true.
/// Otherwise, it would be false.
const bool _autoDetect =
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: false);
bool.fromEnvironment('FLUTTER_WEB_AUTO_DETECT', defaultValue: true);
/// Enable the Skia-based rendering backend.
///