#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/bookmarks/browser/bookmark_utils.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include <vector>
#include "base/memory/raw_ptr.h"
#include "base/scoped_observation.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
#include "components/bookmarks/browser/bookmark_client.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_model_observer.h"
#include "components/bookmarks/browser/bookmark_node_data.h"
#include "components/bookmarks/common/bookmark_metrics.h"
#include "components/bookmarks/test/test_bookmark_client.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
namespace bookmarks {
namespace {
ASCIIToUTF16;
string;
UnorderedElementsAre;
class BookmarkUtilsTest : public testing::Test,
public BaseBookmarkModelObserver { … };
class SuggestFolderClient : public TestBookmarkClient { … };
TEST_F(BookmarkUtilsTest, GetBookmarksMatchingPropertiesWordPhraseQuery) { … }
TEST_F(BookmarkUtilsTest, GetBookmarksMatchingPropertiesUrl) { … }
TEST_F(BookmarkUtilsTest, GetBookmarksMatchingPropertiesTitle) { … }
TEST_F(BookmarkUtilsTest, GetBookmarksMatchingPropertiesConjunction) { … }
#if !BUILDFLAG(IS_IOS)
TEST_F(BookmarkUtilsTest, PasteBookmarkFromURL) { … }
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
#define MAYBE_CopyPaste …
#else
#define MAYBE_CopyPaste …
#endif
TEST_F(BookmarkUtilsTest, MAYBE_CopyPaste) { … }
TEST_F(BookmarkUtilsTest, MakeTitleUnique) { … }
TEST_F(BookmarkUtilsTest, CopyPasteMetaInfo) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC)
#define MAYBE_CutToClipboard …
#else
#define MAYBE_CutToClipboard …
#endif
TEST_F(BookmarkUtilsTest, MAYBE_CutToClipboard) { … }
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS_LACROS)
#define MAYBE_PasteNonEditableNodes …
#else
#define MAYBE_PasteNonEditableNodes …
#endif
TEST_F(BookmarkUtilsTest, MAYBE_PasteNonEditableNodes) { … }
#endif
TEST_F(BookmarkUtilsTest, GetParentForNewNodes) { … }
TEST_F(BookmarkUtilsTest, GetParentForNewNodes_ClientOverride) { … }
TEST_F(BookmarkUtilsTest, CloneMetaInfo) { … }
TEST_F(BookmarkUtilsTest, RemoveAllBookmarks) { … }
TEST_F(BookmarkUtilsTest, CleanUpUrlForMatching) { … }
}
}