This directory contains code related to the
fuchsia.web FIDL API. Specifically, it contains the implementation of Fuchsia WebEngine and code related to it, including the Runners that use it. Code in this directory must not be used outside it and its subdirectories.
General information about Chromium on Fuchsia is here.
Each of the following subdirectories contain code for a specific Fuchsia service:
./commoncontains code shared by both WebEngine and Runners.
./runnerscontains implementations of Fuchsia
./runners/castEnables the Fuchsia system to launch Cast applications.
./shellcontains WebEngineShell, a simple wrapper for launching URLs in WebEngine from the command line.
./webenginecontains the WebEngine implementation. WebEngine is an implementation of
fuchsia.webthat enables Fuchsia Components to render web content using Chrome's Content layer.
./webinstance_hostcontains code for WebEngine clients to directly instantiate a WebInstance Component (
web_instance.cm) using the WebEngine package.
There are 3 major types of tests within this directory:
//fuchsia_web/webengine:web_engine_integration_testsmake use of the
//fuchsia_web/webengine:web_enginecomponent. The test code runs in a separate process in a separate Fuchsia Component, allowing only access to the published API of the component under test.
Integration tests are more resource-intensive than browser tests, which are in turn more expensive than unit tests. Therefore, when writing new tests, it is preferred to write unit tests over browser tests over integration tests.
As a general rule, test-only code should live in the same directory as the code under test with an explicit file name, either
*_ browsertest.cc or
Test code that is shared across Components should live in
a dedicated ``test directory. For example, the
//fuchsia_web/webengine/test directory, which contains code shared by all browser tests, and
//fuchsia_web/common/test, which contains code shared by tests for both WebEngine and Runners.