#include "chrome/browser/extensions/api/reading_list/reading_list_api.h"
#include <memory>
#include "base/location.h"
#include "base/test/values_test_util.h"
#include "base/time/time.h"
#include "chrome/browser/extensions/api/reading_list/reading_list_api_constants.h"
#include "chrome/browser/extensions/api/reading_list/reading_list_event_router.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/reading_list/reading_list_model_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/extensions/api/reading_list.h"
#include "chrome/test/base/test_browser_window.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/reading_list/core/reading_list_entry.h"
#include "components/reading_list/core/reading_list_model.h"
#include "components/reading_list/core/reading_list_test_utils.h"
#include "components/version_info/channel.h"
#include "content/public/browser/browser_context.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/test_event_router_observer.h"
#include "extensions/common/extension_builder.h"
#include "extensions/common/features/feature_channel.h"
#include "url/gurl.h"
namespace extensions {
namespace {
scoped_refptr<const Extension> CreateReadingListExtension() { … }
void AddReadingListEntry(ReadingListModel* reading_list_model,
const GURL& url,
const std::string& title,
bool has_been_read) { … }
std::unique_ptr<KeyedService> BuildReadingListEventRouter(
content::BrowserContext* context) { … }
std::unique_ptr<KeyedService> BuildEventRouter(
content::BrowserContext* context) { … }
}
class ReadingListApiUnitTest : public ExtensionServiceTestBase { … };
void ReadingListApiUnitTest::SetUp() { … }
void ReadingListApiUnitTest::TearDown() { … }
TEST_F(ReadingListApiUnitTest, AddUniqueURL) { … }
TEST_F(ReadingListApiUnitTest, AddEntryThatHasBeenRead) { … }
TEST_F(ReadingListApiUnitTest, AddDuplicateURL) { … }
TEST_F(ReadingListApiUnitTest, RemoveURL) { … }
TEST_F(ReadingListApiUnitTest, RemoveNonExistentURL) { … }
TEST_F(ReadingListApiUnitTest, UpdateEntryFeatures) { … }
TEST_F(ReadingListApiUnitTest, UpdateEntryOnlyWithTheURL) { … }
TEST_F(ReadingListApiUnitTest, RetrieveAllEntries) { … }
TEST_F(ReadingListApiUnitTest, RetrieveCertainEntries) { … }
TEST_F(ReadingListApiUnitTest, NoEntriesRetrieved) { … }
TEST_F(ReadingListApiUnitTest, ReadingListOnEntryAdded) { … }
TEST_F(ReadingListApiUnitTest, ReadingListOnEntryRemoved) { … }
TEST_F(ReadingListApiUnitTest, ReadingListOnEntryUpdated) { … }
}