#include "storage/browser/database/database_tracker.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include "base/files/file.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/gtest_prod_util.h"
#include "base/memory/ptr_util.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h"
#include "storage/browser/quota/quota_client_type.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "storage/common/database/database_identifier.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/cleanup/cleanup.h"
#include "third_party/sqlite/sqlite3.h"
namespace storage {
const char kOrigin1Url[] = …;
const char kOrigin2Url[] = …;
class TestObserver : public DatabaseTracker::Observer { … };
void CheckNotificationReceived(TestObserver* observer,
const std::string& expected_origin_identifier,
const std::u16string& expected_database_name,
int64_t expected_database_size) { … }
class TestQuotaManagerProxy : public QuotaManagerProxy { … };
bool EnsureFileOfSize(const base::FilePath& file_path, int64_t length) { … }
class DatabaseTracker_TestHelper_Test { … };
TEST(DatabaseTrackerTest, DeleteOpenDatabase) { … }
TEST(DatabaseTrackerTest, DeleteOpenDatabaseIncognitoMode) { … }
TEST(DatabaseTrackerTest, DatabaseTracker) { … }
TEST(DatabaseTrackerTest, DatabaseTrackerIncognitoMode) { … }
TEST(DatabaseTrackerTest, DatabaseTrackerQuotaIntegration) { … }
TEST(DatabaseTrackerTest, DatabaseTrackerQuotaIntegrationIncognitoMode) { … }
TEST(DatabaseTrackerTest, EmptyDatabaseNameIsValid) { … }
TEST(DatabaseTrackerTest, HandleSqliteError) { … }
}