chromium/components/sync_bookmarks/bookmark_specifics_conversions_unittest.cc

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

#include "components/sync_bookmarks/bookmark_specifics_conversions.h"

#include <memory>
#include <string>
#include <utility>
#include <vector>

#include "base/strings/strcat.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_node.h"
#include "components/bookmarks/browser/bookmark_uuids.h"
#include "components/bookmarks/test/test_bookmark_client.h"
#include "components/favicon/core/test/mock_favicon_service.h"
#include "components/sync/base/client_tag_hash.h"
#include "components/sync/base/unique_position.h"
#include "components/sync/protocol/bookmark_specifics.pb.h"
#include "components/sync/protocol/entity_data.h"
#include "components/sync/protocol/entity_specifics.pb.h"
#include "components/sync_bookmarks/bookmark_model_view.h"
#include "components/sync_bookmarks/synced_bookmark_tracker.h"
#include "components/sync_bookmarks/synced_bookmark_tracker_entity.h"
#include "components/sync_bookmarks/test_bookmark_model_view.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_unittest_util.h"
#include "url/gurl.h"

namespace sync_bookmarks {

namespace {

_;
Eq;
Ge;
IsEmpty;
Not;
NotNull;

// Fork of enum InvalidBookmarkSpecificsError.
enum class InvalidBookmarkSpecificsError {};

sync_pb::UniquePosition RandomUniquePosition() {}

// Returns a single-color 16x16 image using |color|.
gfx::Image CreateTestImage(SkColor color) {}

TEST(BookmarkSpecificsConversionsTest, ShouldCreateSpecificsFromBookmarkNode) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateSpecificsFromBookmarkNodeNoDateLastUsed) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateSpecificsFromBookmarkNodeWithIllegalTitle) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateSpecificsWithoutUrlFromFolderNode) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldLoadFaviconWhenCreatingSpecificsFromBookmarkNode) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldNotLoadFaviconWhenCreatingSpecificsFromBookmarkNode) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldIncludeFaviconWhenCreatingSpecificsFromBookmarkNodeIfLoaded) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldOmitLargeFaviconUrlWhenCreatingSpecificsFromBookmarkNode) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateNonFolderBookmarkNodeFromSpecifics) {}

TEST(BookmarkSpecificsConversionsTest, ShouldCreateFolderFromSpecifics) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldPreferFullTitleOnCreatingBookmarkNodeFromSpecifics) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateBookmarkNodeFromSpecificsWithIllegalTitle) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldCreateBookmarkNodeFromSpecificsWithFaviconAndWithoutIconUrl) {}

TEST(BookmarkSpecificsConversionsTest, ShouldUpdateBookmarkNodeFromSpecifics) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldPreferFullTitleOnUpdateBookmarkNodeFromSpecifics) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldUpdateBookmarkNodeFromSpecificsWithFaviconAndWithoutIconUrl) {}

TEST(BookmarkSpecificsConversionsTest, ShouldBeValidBookmarkSpecifics) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeValidBookmarkSpecificsWithFaviconAndWithoutIconUrl) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeInvalidBookmarkSpecificsWithoutFaviconAndWithIconUrl) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeInvalidBookmarkSpecificsWithInvalidUuid) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeInvalidBookmarkSpecificsWithInvalidParentUuid) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeInvalidBookmarkSpecificsDueToInvalidUniquePosition) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldBeInvalidBookmarkSpecificsWithBannedUuid) {}

TEST(BookmarkSpecificsConversionsTest, ShouldBeInvalidBookmarkSpecifics) {}

TEST(BookmarkSpecificsConversionsTest, ReplaceUrlNodeWithUpdatedUuid) {}

TEST(BookmarkSpecificsConversionsTest, ReplaceFolderNodeWithUpdatedUuid) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldConsiderValidBookmarkGuidIfMatchesClientTag) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldConsiderValidBookmarkGuidIfMatchesOriginator) {}

TEST(BookmarkSpecificsConversionsTest,
     ShouldConsiderInvalidBookmarkGuidIfEmptyOriginator) {}

}  // namespace

}  // namespace sync_bookmarks