#include "chrome/browser/extensions/api/declarative_content/declarative_content_is_bookmarked_condition_tracker.h"
#include <memory>
#include <set>
#include <utility>
#include <vector>
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
#include "chrome/browser/extensions/api/declarative_content/content_predicate_evaluator.h"
#include "chrome/browser/extensions/api/declarative_content/declarative_content_condition_tracker_test.h"
#include "chrome/test/base/testing_profile.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/scoped_group_bookmark_actions.h"
#include "components/bookmarks/common/bookmark_metrics.h"
#include "components/bookmarks/test/bookmark_test_helpers.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace extensions {
namespace {
scoped_refptr<const Extension> CreateExtensionWithBookmarksPermission(
bool include_bookmarks) { … }
std::unique_ptr<DeclarativeContentIsBookmarkedPredicate> CreatePredicate(
ContentPredicateEvaluator* evaluator,
const Extension* extension,
bool is_bookmarked) { … }
}
HasSubstr;
UnorderedElementsAre;
UnorderedElementsAreArray;
class DeclarativeContentIsBookmarkedConditionTrackerTest
: public DeclarativeContentConditionTrackerTest { … };
TEST(DeclarativeContentIsBookmarkedPredicateTest,
IsBookmarkedPredicateRequiresBookmarkPermissionPermission) { … }
TEST(DeclarativeContentIsBookmarkedPredicateTest,
WrongIsBookmarkedPredicateDatatype) { … }
TEST(DeclarativeContentIsBookmarkedPredicateTest, IsBookmarkedPredicateTrue) { … }
TEST(DeclarativeContentIsBookmarkedPredicateTest, IsBookmarkedPredicateFalse) { … }
TEST_F(DeclarativeContentIsBookmarkedConditionTrackerTest,
BookmarkedAtStartOfTracking) { … }
TEST_F(DeclarativeContentIsBookmarkedConditionTrackerTest,
AddAndRemoveBookmark) { … }
TEST_F(DeclarativeContentIsBookmarkedConditionTrackerTest, ExtensiveChanges) { … }
TEST_F(DeclarativeContentIsBookmarkedConditionTrackerTest, Navigation) { … }
}