/* SPDX-FileCopyrightText: 2007 Glenn Ergeerts SPDX-FileCopyrightText: 2012 Marco Gulino SPDX-FileCopyrightText: 2021 Alexander Lohnau SPDX-License-Identifier: LGPL-2.0-or-later */ #pragma once #include "browsers/findprofile.h" #include class FakeFindProfile : public FindProfile { public: FakeFindProfile(const QList &profiles) : m_profiles(profiles) { } QList find() override { return m_profiles; } private: QList m_profiles; }; class TestChromeBookmarks : public QObject { Q_OBJECT public: explicit TestChromeBookmarks(QObject *parent = nullptr) : QObject(parent) { } private Q_SLOTS: void initTestCase(); void bookmarkFinderShouldFindEachProfileDirectory(); void bookmarkFinderShouldReportNoProfilesOnErrors(); void itShouldFindNothingWhenPrepareIsNotCalled(); void itShouldGracefullyExitWhenFileIsNotFound(); void itShouldFindAllBookmarks(); void itShouldFindOnlyMatches(); void itShouldClearResultAfterCallingTeardown(); void itShouldFindBookmarksFromAllProfiles(); private: QScopedPointer m_findBookmarksInCurrentDirectory; QString m_configHome; };