#include <memory>
#include <utility>
#include <vector>
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/gtest_util.h"
#include "base/unguessable_token.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/paint_preview/browser/compositor_utils.h"
#include "components/paint_preview/browser/paint_preview_base_service_test_factory.h"
#include "components/paint_preview/browser/paint_preview_compositor_client_impl.h"
#include "components/paint_preview/browser/paint_preview_compositor_service_impl.h"
#include "components/paint_preview/browser/warm_compositor.h"
#include "components/paint_preview/public/paint_preview_compositor_client.h"
#include "components/paint_preview/public/paint_preview_compositor_service.h"
#include "components/services/paint_preview_compositor/public/mojom/paint_preview_compositor.mojom.h"
#include "content/public/browser/service_process_host.h"
#include "content/public/test/browser_test.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace paint_preview {
namespace {
std::unique_ptr<PaintPreviewCompositorServiceImpl> ToCompositorServiceImpl(
std::unique_ptr<PaintPreviewCompositorService, base::OnTaskRunnerDeleter>
service) { … }
std::unique_ptr<PaintPreviewCompositorClientImpl> ToCompositorClientImpl(
std::unique_ptr<PaintPreviewCompositorClient, base::OnTaskRunnerDeleter>
client) { … }
bool IsBoundAndConnected(PaintPreviewCompositorClientImpl* compositor) { … }
}
class PaintPreviewCompositorBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(PaintPreviewCompositorBrowserTest,
TestInitializationSuccess) { … }
IN_PROC_BROWSER_TEST_F(PaintPreviewCompositorBrowserTest, CompositorCreate) { … }
IN_PROC_BROWSER_TEST_F(PaintPreviewCompositorBrowserTest,
MultipleCompositorCreate) { … }
IN_PROC_BROWSER_TEST_F(PaintPreviewCompositorBrowserTest,
KillWithActiveCompositors) { … }
IN_PROC_BROWSER_TEST_F(PaintPreviewCompositorBrowserTest, PreWarmCompositor) { … }
}