This relands https://github.com/flutter/engine/pull/53679. The difference from the previous attempt is in the last commit, which prevents synthetic focus requests from echoing back into the framework. That part broke too many tests in g3 and needs to be revisited. ## Original description Stop using `SemanticsAction.didGain/LoseAccessibilityFocus` on the web, start using `SemanticsAction.focus`. This is because on the web, a11y focus is not observable, only input focus is. Sending `SemanticsAction.focus` will guarantee that the framework move focus to the respective widget. There currently is no "unfocus" signal, because it seems to be already covered: either another widget gains focus, or an HTML DOM element outside the Flutter view does, both of which have their respective signals already. More details in the discussion in the issue https://github.com/flutter/flutter/issues/83809. Fixes https://github.com/flutter/flutter/issues/83809 Fixes https://github.com/flutter/flutter/issues/148285 Fixes https://github.com/flutter/flutter/issues/143337
...............................................................................
Flutter Web Engine Test Suites
The flutter engine unit tests can be run with a number of different
configuration options that affect both compile time and run time. The
permutations of these options are specified in the felt_config.yaml file that
is colocated with this README. Here is an overview of the way the test suite
configurations are structured:
compile-configs
Specifies how the tests should be compiled. Each compile config specifies the following:
name- The name of the compile configuration.compiler- What compiler is used to compile the tests. Currently we supportdart2jsanddart2wasmas values.renderer- Which renderer to use when compiling the tests. Currently we supporthtml,canvaskit, andskwasm.
test-sets
A group of files that contain unit tests. Each test set specifies the following:
name- The name of the test set.directory- The name of the directory underflutter/lib/web_ui/testthat contains all the test files.
test-bundles
Specifies a group of tests and a compile configuration of those tests. The output
of the test bundles appears in flutter/lib/web_ui/build/test_bundles/<name>
where <name> is replaced by the name of the bundle. Each test bundle may be used
by multiple test suites. Each test bundle specifies the following:
name- The name of the test bundle.test-set- The name of the test set that contains the tests to be compiled.compile-config- The name of the compile configuration to use.
run-configs
Specifies the test environment that should be provided to a unit test. Each run config specifies the following:
name- Name of the run configuration.browser- The browser with which to run the tests. Valid values for this arechrome,firefox,safarioredge.canvaskit-variant- An optionally supplied argument that forces the tests to use a particular variant of CanvasKit, eitherfullorchromium. If none is specified, the engine will select the variant based on its normal selection logic.
test-suites
This is a fully specified run of a group of unit tests. They specify the following:
name- Name of the test suite.test-bundle- Which compiled test bundle to use when running the suite.run-config- Which run configuration to use when runnin the tests.artifact-deps- Which gn/ninja build artifacts are needed to run the suite. Valid values arecanvaskit,canvaskit_chromiumorskwasm.