#include "components/offline_pages/core/model/delete_page_task.h"
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "components/offline_pages/core/client_namespace_constants.h"
#include "components/offline_pages/core/model/model_task_test_base.h"
#include "components/offline_pages/core/model/offline_page_model_utils.h"
#include "components/offline_pages/core/offline_clock.h"
#include "components/offline_pages/core/offline_page_types.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace offline_pages {
namespace {
const char kTestNamespace[] = …;
const ClientId kTestClientIdNoMatch(kTestNamespace, "20170905");
}
class DeletePageTaskTest : public ModelTaskTestBase { … };
void DeletePageTaskTest::SetUp() { … }
void DeletePageTaskTest::OnDeletePageDone(
DeletePageResult result,
const std::vector<OfflinePageItem>& deleted_page_items) { … }
DeletePageTask::DeletePageTaskCallback
DeletePageTaskTest::delete_page_callback() { … }
bool DeletePageTaskTest::CheckPageDeleted(const OfflinePageItem& page) { … }
TEST_F(DeletePageTaskTest, OfflinePageItemIsPopulated) { … }
TEST_F(DeletePageTaskTest, DeletePageByUrlPredicate) { … }
TEST_F(DeletePageTaskTest, DeletePageByUrlPredicateNotFound) { … }
TEST_F(DeletePageTaskTest, DeletePageForPageLimit) { … }
TEST_F(DeletePageTaskTest, DeletePageForPageLimit_UnlimitedNamespace) { … }
}