chromium/components/sync/engine/bookmark_update_preprocessing_unittest.cc

// Copyright 2019 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/engine/bookmark_update_preprocessing.h"

#include <stdint.h>

#include "base/test/metrics/histogram_tester.h"
#include "base/uuid.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/protocol/sync_entity.pb.h"
#include "components/sync/protocol/unique_position.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace syncer {

namespace {

Eq;
IsEmpty;
Ne;

enum class ExpectedBookmarkGuidSource {};

TEST(BookmarkUpdatePreprocessingTest,
     ShouldPropagateUniquePositionFromSpecifics) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldPropagateUniquePositionFromSyncEntity) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldComputeUniquePositionFromPositionInParent) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldComputeUniquePositionFromInsertAfterItemId) {}

TEST(BookmarkUpdatePreprocessingTest, ShouldFallBackToRandomUniquePosition) {}

// Tests that AdaptGuidForBookmark() propagates GUID in specifics if the field
// is set (even if it doesn't match the originator client item ID).
TEST(BookmarkUpdatePreprocessingTest, ShouldPropagateGuidFromSpecifics) {}

// Tests that AdaptGuidForBookmark() uses the originator client item ID as GUID
// when it is a valid GUID, and the GUID in specifics is not set.
TEST(BookmarkUpdatePreprocessingTest, ShouldUseOriginatorClientItemIdAsGuid) {}

// Tests that AdaptGuidForBookmark() infers the GUID when the field in specifics
// is empty and originator client item ID is not a valid GUID.
TEST(BookmarkUpdatePreprocessingTest, ShouldInferGuid) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldNotInferGuidIfNoOriginatorInformation) {}

// Tests that inferred GUIDs are computed deterministically.
TEST(BookmarkUpdatePreprocessingTest, ShouldInferDeterministicGuid) {}

// Tests that unique GUIDs are produced if either of the two involved fields
// changes.
TEST(BookmarkUpdatePreprocessingTest, ShouldInferDistictGuids) {}

TEST(BookmarkUpdatePreprocessingTest, ShouldUseTypeInSpecifics) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldInferTypeFromFolderFieldInSyncEntity) {}

TEST(BookmarkUpdatePreprocessingTest,
     ShouldInferTypeFromPresenceOfUrlInSpecifics) {}

}  // namespace

}  // namespace syncer