chromium/components/offline_items_collection/core/throttled_offline_content_provider_unittest.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/memory/raw_ptr.h"
#include "components/offline_items_collection/core/offline_content_aggregator.h"

#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/time.h"
#include "components/offline_items_collection/core/offline_item.h"
#include "components/offline_items_collection/core/test_support/mock_offline_content_provider.h"
#include "components/offline_items_collection/core/test_support/scoped_mock_offline_content_provider.h"
#include "components/offline_items_collection/core/throttled_offline_content_provider.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
Eq;
InvokeWithoutArgs;

namespace offline_items_collection {
namespace {

GetVisualsOptions;

// Helper class to automatically trigger another OnItemUpdated() to the
// underlying provider when this observer gets notified of OnItemUpdated().
// This will only happen the first time the ContentId of the udpated OfflineItem
// matches the ContentId of the OfflineItem passed into this class constructor.
class TriggerSingleReentrantUpdateHelper
    : public ScopedMockOfflineContentProvider::ScopedMockObserver {};

class ThrottledOfflineContentProviderTest : public testing::Test {};

TEST_F(ThrottledOfflineContentProviderTest, TestBasicPassthrough) {}

TEST_F(ThrottledOfflineContentProviderTest, TestRemoveCancelsUpdate) {}

TEST_F(ThrottledOfflineContentProviderTest, TestOnItemUpdatedSquashed) {}

TEST_F(ThrottledOfflineContentProviderTest, TestGetItemByIdOverridesUpdate) {}

TEST_F(ThrottledOfflineContentProviderTest, TestGetAllItemsOverridesUpdate) {}

TEST_F(ThrottledOfflineContentProviderTest, TestThrottleWorksProperly) {}

TEST_F(ThrottledOfflineContentProviderTest, TestInitialRequestGoesThrough) {}

TEST_F(ThrottledOfflineContentProviderTest, TestReentrantUpdatesGetQueued) {}

TEST_F(ThrottledOfflineContentProviderTest, TestPokingProviderFlushesQueue) {}

}  // namespace
}  // namespace offline_items_collection;