From a710f6b33dc42d8e964ea5d66a7ef41d7fa8c399 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Wed, 7 Sep 2022 15:43:55 +0000 Subject: [PATCH] [fuchsia] Component framework v2 variant of web_engine_integration_tests Also expose fuchsia.web.Debug from context_provider when running as a CFv2 component. This allows test clients to more easily connect to a web_instance's Debug protocol. Bug: 1280703, 1346920 Change-Id: I2950cdcb6fd04a8f01105196f9d03abbb1cdec3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3845254 Reviewed-by: Wez Commit-Queue: Greg Thompson Cr-Commit-Position: refs/heads/main@{#1043983} NOKEYCHECK=True GitOrigin-RevId: 1e93159487a62039c8e4310042954697968b16ea --- config/fuchsia/test/README.md | 6 ++++- config/fuchsia/test/archivist.shard.test-cml | 23 +++++++++++++++++++ .../test/web_instance_host.shard.test-cml | 9 ++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 config/fuchsia/test/archivist.shard.test-cml create mode 100644 config/fuchsia/test/web_instance_host.shard.test-cml diff --git a/config/fuchsia/test/README.md b/config/fuchsia/test/README.md index 8a5c1e09bd..246a92d062 100644 --- a/config/fuchsia/test/README.md +++ b/config/fuchsia/test/README.md @@ -8,6 +8,10 @@ below: ### General Purpose Fragments +#### archivist.shard.test-cml +Runs an `archivist-without-attribution` with custom protocol routing for tests +that want to intercept events written to a `LogSink` by a component. + #### chromium_test_facet.shard.test-cml Runs CFv2 tests in the "chromium" test realm. This is generally required for all Chromium tests that must interact with true system services. @@ -83,5 +87,5 @@ Contains services that need to be present when creating a `fuchsia.web.Context`. Note that the `fuchsia.scheduler.ProfileProvider` service is only used in tests that encounter memory pressure code. -#### web_instance_host_capabilities.test-cmx +#### web_instance_host_capabilities.test-cmx and web_instance_host.shard.test-cml Contains services that need to be present to use `WebInstanceHost`. diff --git a/config/fuchsia/test/archivist.shard.test-cml b/config/fuchsia/test/archivist.shard.test-cml new file mode 100644 index 0000000000..3570f0daf0 --- /dev/null +++ b/config/fuchsia/test/archivist.shard.test-cml @@ -0,0 +1,23 @@ +// Copyright 2022 The Chromium Authors. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +{ + children: [ + { + name: "isolated_archivist", + url: "fuchsia-pkg://fuchsia.com/archivist-without-attribution#meta/archivist-without-attribution.cm", + }, + ], + use: [ + { + protocol: "fuchsia.logger.Log", + path: "/svc/fuchsia.logger.Log.isolated", + from: "#isolated_archivist", + }, + { + protocol: "fuchsia.logger.LogSink", + path: "/svc/fuchsia.logger.LogSink.isolated", + from: "#isolated_archivist", + }, + ], +} diff --git a/config/fuchsia/test/web_instance_host.shard.test-cml b/config/fuchsia/test/web_instance_host.shard.test-cml new file mode 100644 index 0000000000..59b4def711 --- /dev/null +++ b/config/fuchsia/test/web_instance_host.shard.test-cml @@ -0,0 +1,9 @@ +{ + use: [ + { + protocol: [ + "fuchsia.sys.Environment", + ], + }, + ], +}