#include "components/offline_pages/core/background/change_requests_state_task.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/test/test_mock_time_task_runner.h"
#include "components/offline_pages/core/background/request_queue_store.h"
#include "components/offline_pages/core/background/request_queue_task_test_base.h"
#include "components/offline_pages/core/background/test_request_queue_store.h"
#include "components/offline_pages/core/offline_clock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace offline_pages {
namespace {
const int64_t kRequestId1 = …;
const int64_t kRequestId2 = …;
const int64_t kRequestId3 = …;
const ClientId kClientId1("bookmark", "1234");
const ClientId kClientId2("async", "5678");
class ChangeRequestsStateTaskTest : public RequestQueueTaskTestBase { … };
void ChangeRequestsStateTaskTest::AddItemsToStore() { … }
void ChangeRequestsStateTaskTest::ChangeRequestsStateCallback(
UpdateRequestsResult result) { … }
void ChangeRequestsStateTaskTest::InitializeStoreDone(bool success) { … }
void ChangeRequestsStateTaskTest::AddRequestDone(AddRequestResult result) { … }
TEST_F(ChangeRequestsStateTaskTest, UpdateWhenStoreEmpty) { … }
TEST_F(ChangeRequestsStateTaskTest, UpdateSingleItem) { … }
TEST_F(ChangeRequestsStateTaskTest, UpdateMultipleItems) { … }
TEST_F(ChangeRequestsStateTaskTest, EmptyRequestsList) { … }
TEST_F(ChangeRequestsStateTaskTest, UpdateMissingItem) { … }
}
}