#include "chrome/browser/extensions/activity_log/activity_database.h"
#include <stddef.h>
#include <string>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_clock.h"
#include "base/time/time.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/activity_log/fullstream_ui_policy.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/test_extension_system.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 "content/public/browser/web_contents.h"
#include "extensions/common/dom_action_types.h"
#include "sql/statement.h"
#include "testing/gtest/include/gtest/gtest.h"
constants;
namespace extensions {
class ActivityDatabaseTestPolicy : public ActivityDatabase::Delegate { … };
const char* const ActivityDatabaseTestPolicy::kTableContentFields[] = …;
const char* const ActivityDatabaseTestPolicy::kTableFieldTypes[] = …;
bool ActivityDatabaseTestPolicy::InitDatabase(sql::Database* db) { … }
bool ActivityDatabaseTestPolicy::FlushDatabase(sql::Database* db) { … }
void ActivityDatabaseTestPolicy::Record(ActivityDatabase* db,
scoped_refptr<Action> action) { … }
class ActivityDatabaseTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(ActivityDatabaseTest, Init) { … }
TEST_F(ActivityDatabaseTest, RecordAction) { … }
TEST_F(ActivityDatabaseTest, BatchModeOff) { … }
TEST_F(ActivityDatabaseTest, BatchModeOn) { … }
TEST_F(ActivityDatabaseTest, BatchModeFlush) { … }
TEST_F(ActivityDatabaseTest, InitFailure) { … }
}