README.md
1## Manifest Fragments
2
3This directory contains the manifest fragments that are required for running
4Fuchsia tests hermetically. Tests start from `minimum.shard.test-cml` and add
5additional capabilities as necessary by providing the
6`additional_manifest_fragments` argument. Some fragments are explained in detail
7below:
8
9### General Purpose Fragments
10
11#### archivist.shard.test-cml
12Runs an `archivist-for-embedding` with custom protocol routing for tests
13that want to intercept events written to a `LogSink` by a component.
14
15#### chromium_test_facet.shard.test-cml
16Runs tests in the `chromium` test realm, which is mostly hermetic but has
17access to specific system services that cannot (currently) be faked. For more
18information, see https://fxbug.dev/91934. This is generally required for all
19Chromium tests not using the
20[`chromium_system_test_facet`](#chromium_system_test_facetshardtest-cml).
21
22#### fonts.shard.test-cml
23For tests that need `fuchsia.fonts.Provider` to provide a basic set of fonts.
24This shard runs an isolated font provider with fonts bundled into the fonts
25package.
26
27#### test_fonts.shard.test-cml
28For tests that need `fuchsia.fonts.Provider` to provide a specific set of fonts
29(beyond that provided by `fonts.shard.test-cml`). This shard requires fonts to
30be provided as a directory. The directory must be named `config-data`, must
31contain the file named `all_font_manifest.json`, and all the font files named
32in it. For details see the [font manifest][fm] in Fuchsia documentation.
33
34[fm]: https://fuchsia.dev/fuchsia-src/development/internationalization/fonts/build?hl=en#:font_collection-outputs
35
36The user of this shard must provide a directory `/pkg/test_fonts`, which must
37contain all the files described above.
38
39Within Chromium, these fonts are usually provided via the target
40`//skia:test_fonts`.
41
42#### mark_vmo_executable.shard.test-cml
43Required by tests that execute JavaScript. Should only be required in a small
44number of tests.
45
46#### minimum.shard.test-cml
47Capabilities required by anything that uses `//base/test` when running in the
48(default) `chromium` test realm. It is the default base fragment for most
49`test()` Components.
50
51#### logger.shard.test-cml
52For tests that test logging functionality by providing `fuchsia.logger.Log`.
53
54#### sysmem.shard.test-cml
55For tests that depend on the sysmem service (e.g. to allocate image buffers to
56share with Vulkan and Scenic).
57
58#### system_test_minimum.shard.test-cml
59Capabilities required by anything that uses `//base/test` when running as a
60system test in the `chromium-system` test realm. It is the base fragment for
61`test()` Components that use the
62[`chromium_system_test_facet`](#chromium_system_test_facetshardtest-cml).
63
64Most tests use the [`minimum`](#minimumshardtest-cml) shard.
65
66#### chromium_system_test_facet.shard.test-cml
67Runs tests in the `chromium-system` test realm. This is required for Chromium
68tests that are intended to run against the actual system and its real system
69services. This is required for, for example, performance tests intended to
70measure system performance. Another overlapping use case is tests that need to
71be run in environments without access to the packages containing fake
72implementations of required protocols that other tests use.
73(https://crbug.com/1408597 should make that use case obsolete.)
74
75Most tests should use the
76[`chromium_test_facet`](#chromium_test_facetshardtest-cml).
77
78#### test_ui_stack.shard.test-cml
79For tests that need an isolated UI subsystem, that supports the Flatland
80API set. This allows tests to e.g. run with view-focus unaffected by any
81other tests running concurrently on the device, as well as providing test-only
82functionality such as input-injection support.
83
84### WebEngine Fragments
85The following fragments are specific to WebEngine functionality as documented
86documentation at
87https://fuchsia.dev/reference/fidl/fuchsia.web#CreateContextParams and
88https://fuchsia.dev/reference/fidl/fuchsia.web#ContextFeatureFlags.
89Any test-specific exceptions are documented for each file.
90
91#### audio_output.shard.test-cml
92Required by tests that need to enable audio output.
93
94#### platform_video_codecs.shard.test-cml
95Required by tests that need accelerated (e.g., hardware) video codecs. A private
96(semi-isolated) instance of codec_factory is run for tests using this shard in
97support of running on system images that don't run it.
98
99#### network.shard.test-cml
100For tests that need access to network services, including those that access a
101local HTTP server.
102
103#### network.shard.test-cml
104Corresponds to the `NETWORK` flag. Required for enabling network access. Note
105that access to the root SSL certificates is not needed if ContextProvider is
106used to launch the `Context`. The `fuchsia.device.NameProvider` dependency comes
107from fdio.
108
109#### present_view.shard.test-cml
110Services that are needed to render web content in a Scenic view and present it.
111Most services are required per the FIDL documentation.
112
113#### web_instance.shard.test-cml
114Contains services that need to be present when creating a `fuchsia.web.Context`.
115Note that the `fuchsia.scheduler.ProfileProvider` service is only used in tests
116that encounter memory pressure code.
117