@@ -1600,3 +1600,34 @@ TEST_F(BraveSyncServiceTest, CheckOtherBookmarkChildRecord) {
1600
1600
sync_service ()->CheckOtherBookmarkChildRecord (record_a1.get ());
1601
1601
EXPECT_EQ (record_a1->GetBookmark ().parentFolderObjectId , object_id_iter1);
1602
1602
}
1603
+
1604
+ TEST_F (BraveSyncServiceTest, AddNonClonedBookmarkKeys) {
1605
+ sync_service ()->AddNonClonedBookmarkKeys (model ());
1606
+ const bookmarks::BookmarkNode* bookmark_a1 =
1607
+ model ()->AddURL (model ()->other_node (), 0 , base::ASCIIToUTF16 (" A1" ),
1608
+ GURL (" https://a1.com" ));
1609
+
1610
+ AsMutable (bookmark_a1)->SetMetaInfo (" object_id" , " object_id_value" );
1611
+ AsMutable (bookmark_a1)->SetMetaInfo (" order" , " order_value" );
1612
+ AsMutable (bookmark_a1)->SetMetaInfo (" sync_timestamp" , " sync_timestamp_value" );
1613
+ AsMutable (bookmark_a1)->SetMetaInfo (" version" , " version_value" );
1614
+
1615
+ model ()->Copy (bookmark_a1, model ()->other_node (), 1 );
1616
+
1617
+ const bookmarks::BookmarkNode* bookmark_copy =
1618
+ model ()->other_node ()->children ().at (1 ).get ();
1619
+
1620
+ std::string meta_object_id;
1621
+ EXPECT_FALSE (bookmark_copy->GetMetaInfo (" object_id" , &meta_object_id));
1622
+ EXPECT_TRUE (meta_object_id.empty ());
1623
+ std::string meta_order;
1624
+ EXPECT_FALSE (bookmark_copy->GetMetaInfo (" order" , &meta_order));
1625
+ EXPECT_TRUE (meta_order.empty ());
1626
+ std::string meta_sync_timestamp;
1627
+ EXPECT_FALSE (
1628
+ bookmark_copy->GetMetaInfo (" sync_timestamp" , &meta_sync_timestamp));
1629
+ EXPECT_TRUE (meta_sync_timestamp.empty ());
1630
+ std::string meta_version;
1631
+ EXPECT_FALSE (bookmark_copy->GetMetaInfo (" version" , &meta_version));
1632
+ EXPECT_TRUE (meta_version.empty ());
1633
+ }
0 commit comments