#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/extensions/activity_log/activity_log.h"
#include <stddef.h>
#include <memory>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "chrome/browser/extensions/activity_log/activity_action_constants.h"
#include "chrome/browser/extensions/activity_log/activity_log_task_runner.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_manager_factory.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_handle.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_manager.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/renderer_startup_helper.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/dom_action_types.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/mojom/renderer.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver_set.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
const char kExtensionId[] = …;
const char* const kUrlApiCalls[] = …;
}
namespace extensions {
class InterceptingRendererStartupHelper : public RendererStartupHelper,
public mojom::Renderer { … };
class ActivityLogTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(ActivityLogTest, Construct) { … }
TEST_F(ActivityLogTest, LogAndFetchActions) { … }
TEST_F(ActivityLogTest, LogPrerender) { … }
TEST_F(ActivityLogTest, ArgUrlExtraction) { … }
TEST_F(ActivityLogTest, UninstalledExtension) { … }
TEST_F(ActivityLogTest, ArgUrlApiCalls) { … }
TEST_F(ActivityLogTest, DeleteActivitiesByExtension) { … }
class ActivityLogTestWithoutSwitch : public ActivityLogTest { … };
TEST_F(ActivityLogTestWithoutSwitch, TestShouldLog) { … }
}