diff --git a/BUILD.gn b/BUILD.gn index 7f83a390a14777..39999272cb18b0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -869,7 +869,7 @@ if (is_fuchsia) { cr_fuchsia_package("d8_fuchsia_pkg") { testonly = true binary = "//v8:d8" - manifest = "//build/config/fuchsia/tests-with-exec.cmx" + manifest = "//v8/gni/v8.cmx" package_name_override = "d8" } @@ -1238,7 +1238,7 @@ if (!is_ios) { root_build_dir) + ")" ] + _common_web_test_args - [ _common_web_test_args[0] ] if (is_asan) { - args += [ "--time-out-ms=30000" ] + args += [ "--time-out-ms=30000" ] } args += [ "--webgpu-cts-expectations", diff --git a/base/fuchsia/base_unittests.test-cmx b/base/fuchsia/base_unittests.test-cmx deleted file mode 100644 index 9e4d8d8f8f1e19..00000000000000 --- a/base/fuchsia/base_unittests.test-cmx +++ /dev/null @@ -1,30 +0,0 @@ -{ - "facets": { - "fuchsia.test": { - "injected-services": { - "fuchsia.intl.PropertyProvider": "fuchsia-pkg://fuchsia.com/intl_property_manager#meta/intl_property_manager.cmx" - }, - "system-services": [ - "fuchsia.boot.ReadOnlyLog" - ] - } - }, - "sandbox": { - "features": [ - "isolated-persistent-storage", - "isolated-temp" - ], - "dev": [ - "null", - "zero" - ], - "services": [ - "fuchsia.boot.ReadOnlyLog", - "fuchsia.intl.PropertyProvider", - "fuchsia.logger.Log", - "fuchsia.logger.LogSink", - "fuchsia.process.Launcher", - "fuchsia.sys.Loader" - ] - } -} diff --git a/build/config/fuchsia/test/README.md b/build/config/fuchsia/test/README.md index 31b8ebd2213e8b..c5f17627f5c30a 100644 --- a/build/config/fuchsia/test/README.md +++ b/build/config/fuchsia/test/README.md @@ -33,10 +33,14 @@ https://fuchsia.dev/reference/fidl/fuchsia.web#CreateContextParams and https://fuchsia.dev/reference/fidl/fuchsia.web#ContextFeatureFlags. Any test-specific exceptions are documented for each file. +#### audio_capabilities.test-cmx +Corresponds to the `AUDIO` flag. Required for enabling audio input and output. + #### network_capabilities.test-cmx Corresponds to the `NETWORK` flag. Required for enabling network access. Note that access to the root SSL certificates is not needed if ContextProvider is -used to launch the `Context`. +used to launch the `Context`. The `fuchsia.device.NameProvider` dependency comes +from fdio. #### present_view_capabilities.test-cmx Services that are needed to render web content in a Scenic view and present it. diff --git a/build/config/fuchsia/test/audio_capabilities.test-cmx b/build/config/fuchsia/test/audio_capabilities.test-cmx new file mode 100644 index 00000000000000..2e2013f9eaf6e3 --- /dev/null +++ b/build/config/fuchsia/test/audio_capabilities.test-cmx @@ -0,0 +1,18 @@ +{ + "facets": { + "fuchsia.test": { + "injected-services": { + "fuchsia.mediacodec.CodecFactory": "fuchsia-pkg://fuchsia.com/codec_factory#meta/codec_factory.cmx" + }, + "system-services": [ + "fuchsia.media.Audio" + ] + } + }, + "sandbox": { + "services": [ + "fuchsia.media.Audio", + "fuchsia.mediacodec.CodecFactory" + ] + } +} \ No newline at end of file diff --git a/build/config/fuchsia/test/network_capabilities.test-cmx b/build/config/fuchsia/test/network_capabilities.test-cmx index cafa4ae8a8550d..54b9e41139d106 100644 --- a/build/config/fuchsia/test/network_capabilities.test-cmx +++ b/build/config/fuchsia/test/network_capabilities.test-cmx @@ -6,13 +6,17 @@ "fuchsia.net.interfaces.State": "fuchsia-pkg://fuchsia.com/netstack#meta/netstack.cmx", "fuchsia.posix.socket.Provider": "fuchsia-pkg://fuchsia.com/netstack#meta/netstack.cmx" } - } + }, + "system-services": [ + "fuchsia.device.NameProvider" + ] }, "sandbox": { "features": [ "root-ssl-certificates" ], "services": [ + "fuchsia.device.NameProvider", "fuchsia.net.NameLookup", "fuchsia.net.interfaces.State", "fuchsia.posix.socket.Provider" diff --git a/build/config/fuchsia/test/web_engine_required_capabilities.test-cmx b/build/config/fuchsia/test/web_engine_required_capabilities.test-cmx index 535418354cd7fa..4cb61fe7f1bd86 100644 --- a/build/config/fuchsia/test/web_engine_required_capabilities.test-cmx +++ b/build/config/fuchsia/test/web_engine_required_capabilities.test-cmx @@ -7,6 +7,7 @@ "fuchsia.web.ContextProvider": "fuchsia-pkg://fuchsia.com/web_engine#meta/context_provider.cmx", }, "system-services": [ + "fuchsia.device.NameProvider", "fuchsia.scheduler.ProfileProvider", "fuchsia.sysmem.Allocator" ] diff --git a/build/config/fuchsia/tests-with-exec.cmx b/build/config/fuchsia/tests-with-exec.cmx deleted file mode 100644 index 8cd8b75fdfe37b..00000000000000 --- a/build/config/fuchsia/tests-with-exec.cmx +++ /dev/null @@ -1,44 +0,0 @@ -{ - "sandbox": { - "dev": [ - "null", - "zero" - ], - "features": [ - "deprecated-ambient-replace-as-executable", - "isolated-cache-storage", - "isolated-persistent-storage", - "isolated-temp", - "root-ssl-certificates", - "vulkan" - ], - "services": [ - "fuchsia.accessibility.semantics.SemanticsManager", - "fuchsia.camera3.DeviceWatcher", - "fuchsia.device.NameProvider", - "fuchsia.fonts.Provider", - "fuchsia.intl.PropertyProvider", - "fuchsia.logger.Log", - "fuchsia.logger.LogSink", - "fuchsia.media.Audio", - "fuchsia.media.SessionAudioConsumerFactory", - "fuchsia.media.drm.Widevine", - "fuchsia.mediacodec.CodecFactory", - "fuchsia.memorypressure.Provider", - "fuchsia.net.NameLookup", - "fuchsia.net.interfaces.State", - "fuchsia.posix.socket.Provider", - "fuchsia.process.Launcher", - "fuchsia.sys.Environment", - "fuchsia.sys.Launcher", - "fuchsia.sys.Loader", - "fuchsia.sysmem.Allocator", - "fuchsia.ui.input.ImeService", - "fuchsia.ui.input.ImeVisibilityService", - "fuchsia.ui.scenic.Scenic", - "fuchsia.ui.policy.Presenter", - "fuchsia.vulkan.loader.Loader", - "fuchsia.web.ContextProvider" - ] - } -} diff --git a/build/config/fuchsia/tests.cmx b/build/config/fuchsia/tests.cmx deleted file mode 100644 index e263b0e235f380..00000000000000 --- a/build/config/fuchsia/tests.cmx +++ /dev/null @@ -1,42 +0,0 @@ -{ - "sandbox": { - "dev": [ - "null", - "zero" - ], - "features": [ - "config-data", - "isolated-cache-storage", - "isolated-persistent-storage", - "isolated-temp", - "root-ssl-certificates", - "vulkan" - ], - "services": [ - "fuchsia.accessibility.semantics.SemanticsManager", - "fuchsia.camera3.DeviceWatcher", - "fuchsia.device.NameProvider", - "fuchsia.fonts.Provider", - "fuchsia.intl.PropertyProvider", - "fuchsia.logger.Log", - "fuchsia.logger.LogSink", - "fuchsia.media.Audio", - "fuchsia.media.SessionAudioConsumerFactory", - "fuchsia.media.drm.Widevine", - "fuchsia.mediacodec.CodecFactory", - "fuchsia.memorypressure.Provider", - "fuchsia.net.NameLookup", - "fuchsia.net.interfaces.State", - "fuchsia.posix.socket.Provider", - "fuchsia.process.Launcher", - "fuchsia.sys.Environment", - "fuchsia.sys.Launcher", - "fuchsia.sys.Loader", - "fuchsia.sysmem.Allocator", - "fuchsia.ui.input.ImeService", - "fuchsia.ui.input.ImeVisibilityService", - "fuchsia.vulkan.loader.Loader", - "fuchsia.web.ContextProvider" - ] - } -} diff --git a/fuchsia/http/BUILD.gn b/fuchsia/http/BUILD.gn index 0144f0b4b8d283..38afeabe2d2c3f 100644 --- a/fuchsia/http/BUILD.gn +++ b/fuchsia/http/BUILD.gn @@ -54,6 +54,8 @@ test("http_service_tests") { "//testing/gtest", ] data = [ "testdata/" ] + additional_manifest_fragments = + [ "//build/config/fuchsia/test/network_capabilities.test-cmx" ] } if (is_official_build) { diff --git a/headless/BUILD.gn b/headless/BUILD.gn index c92579d67ffa43..e32f30387db0d7 100644 --- a/headless/BUILD.gn +++ b/headless/BUILD.gn @@ -843,7 +843,7 @@ if (is_fuchsia) { cr_fuchsia_package("headless_shell_pkg") { binary = ":headless_shell" package_name_override = "headless_shell" - manifest = "//build/config/fuchsia/tests.cmx" + manifest = "//build/config/fuchsia/test/minimum_capabilities.test-cmx" } fuchsia_package_runner("headless_shell_fuchsia") { diff --git a/media/BUILD.gn b/media/BUILD.gn index c96559f185c1eb..7e7271097d2454 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -196,11 +196,14 @@ test("media_unittests") { } if (is_fuchsia) { - deps += [ - "//media/fuchsia/audio:unittests", - "//media/fuchsia/cdm/service:unittests", + additional_manifest_fragments = [ + "//build/config/fuchsia/test/audio_capabilities.test-cmx", + + # TODO(crbug.com/1185811): Figure out why jit_capabilities is needed. + "//build/config/fuchsia/test/jit_capabilities.test-cmx", + + "//build/config/fuchsia/test/vulkan_capabilities.test-cmx", ] - manifest = "//media/fuchsia/media_unittests.test-cmx" } if (enable_media_remoting) { diff --git a/media/blink/BUILD.gn b/media/blink/BUILD.gn index 5e5ede151daf3e..3537092d52bfa4 100644 --- a/media/blink/BUILD.gn +++ b/media/blink/BUILD.gn @@ -169,4 +169,9 @@ test("media_blink_unittests") { deps += [ "//v8:v8_external_startup_data_assets" ] } } + + if (is_fuchsia) { + additional_manifest_fragments = + [ "//build/config/fuchsia/test/jit_capabilities.test-cmx" ] + } } diff --git a/media/fuchsia/media_unittests.test-cmx b/media/fuchsia/media_unittests.test-cmx deleted file mode 100644 index 923550a61f5f8e..00000000000000 --- a/media/fuchsia/media_unittests.test-cmx +++ /dev/null @@ -1,42 +0,0 @@ -{ - "facets": { - "fuchsia.test": { - "injected-services": { - "fuchsia.intl.PropertyProvider": "fuchsia-pkg://fuchsia.com/intl_property_manager#meta/intl_property_manager.cmx", - "fuchsia.mediacodec.CodecFactory": "fuchsia-pkg://fuchsia.com/codec_factory#meta/codec_factory.cmx" - }, - "system-services": [ - "fuchsia.sysmem.Allocator", - "fuchsia.media.Audio", - "fuchsia.media.AudioCore" - ] - } - }, - "sandbox": { - "features": [ - "config-data", - "deprecated-ambient-replace-as-executable", - "isolated-persistent-storage", - "isolated-temp", - "vulkan" - ], - "dev": [ - "null", - "zero" - ], - "services": [ - "fuchsia.camera3.DeviceWatcher", - "fuchsia.intl.PropertyProvider", - "fuchsia.logger.Log", - "fuchsia.logger.LogSink", - "fuchsia.media.Audio", - "fuchsia.media.SessionAudioConsumerFactory", - "fuchsia.media.drm.Widevine", - "fuchsia.mediacodec.CodecFactory", - "fuchsia.memorypressure.Provider", - "fuchsia.process.Launcher", - "fuchsia.sys.Loader", - "fuchsia.sysmem.Allocator" - ] - } -} diff --git a/net/BUILD.gn b/net/BUILD.gn index f343112598fab0..b00e99ddcd0f67 100644 --- a/net/BUILD.gn +++ b/net/BUILD.gn @@ -4629,6 +4629,8 @@ test("net_unittests") { "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp", ] sources += [ "base/network_change_notifier_fuchsia_unittest.cc" ] + additional_manifest_fragments = + [ "//build/config/fuchsia/test/network_capabilities.test-cmx" ] } if (use_nss_certs) { diff --git a/testing/test.gni b/testing/test.gni index ea96fe187398b1..24ebdea6c49fbc 100644 --- a/testing/test.gni +++ b/testing/test.gni @@ -260,18 +260,8 @@ template("test") { _pkg_target = "${_output_name}_pkg" _exec_target = "${_output_name}__exec" - # TODO(crbug.com/1019938): make minimum_capabilities.test-cmx the default - # and have everything added via additional_manifest_fragments - if (!defined(invoker.manifest)) { - if (!defined(invoker.additional_manifest_fragments)) { - manifest_fragments = [ "//build/config/fuchsia/tests-with-exec.cmx" ] - } else { - manifest_fragments = - [ "//build/config/fuchsia/test/minimum_capabilities.test-cmx" ] - } - } else { - manifest_fragments = [ invoker.manifest ] - } + manifest_fragments = + [ "//build/config/fuchsia/test/minimum_capabilities.test-cmx" ] if (defined(invoker.additional_manifest_fragments)) { manifest_fragments += invoker.additional_manifest_fragments