#include "content/browser/font_access/font_access_manager.h"
#include <memory>
#include <optional>
#include <utility>
#include <vector>
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/sequence_bound.h"
#include "content/browser/font_access/font_access_test_utils.h"
#include "content/browser/font_access/font_enumeration_cache.h"
#include "content/browser/font_access/font_enumeration_data_source.h"
#include "content/browser/renderer_host/frame_tree_node.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/test/test_browser_context.h"
#include "content/test/test_render_frame_host.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/font_access/font_enumeration_table.pb.h"
#include "third_party/blink/public/mojom/font_access/font_access.mojom.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-shared.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom.h"
#include "third_party/blink/public/mojom/frame/user_activation_update_types.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"
FontEnumerationStatus;
namespace content {
namespace {
class FontAccessManagerSync { … };
class FontAccessManagerTest : public RenderViewHostImplTestHarness { … };
namespace {
void ValidateFontEnumerationBasic(FontEnumerationStatus status,
base::ReadOnlySharedMemoryRegion region) { … }
}
TEST_F(FontAccessManagerTest, FailsIfFrameNotInViewport) { … }
TEST_F(FontAccessManagerTest, EnumerationConsumesUserActivation) { … }
TEST_F(FontAccessManagerTest, PreviouslyGrantedValidateEnumerationBasic) { … }
TEST_F(FontAccessManagerTest, UserActivationRequiredBeforeGrant) { … }
TEST_F(FontAccessManagerTest, EnumerationFailsIfNoActivation) { … }
TEST_F(FontAccessManagerTest, PermissionDeniedOnAskErrors) { … }
TEST_F(FontAccessManagerTest, PermissionPreviouslyDeniedErrors) { … }
}
}