Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Unified Diff: sync/internal_api/sync_manager_impl_unittest.cc

Issue 11413153: Remove legacy GetURL(),SetURL(),GetFaviconBytes(),SetFaviconBytes() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/internal_api/public/write_node.h ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/sync_manager_impl_unittest.cc
diff --git a/sync/internal_api/sync_manager_impl_unittest.cc b/sync/internal_api/sync_manager_impl_unittest.cc
index e413221b6c901c24da5471476ca40bbdbf0ad9f0..dd4b85c605fd3a5e05d1cfeb237238277eee18f7 100644
--- a/sync/internal_api/sync_manager_impl_unittest.cc
+++ b/sync/internal_api/sync_manager_impl_unittest.cc
@@ -2123,7 +2123,7 @@ TEST_F(SyncManagerTest, EncryptBookmarksWithLegacyData) {
// See BookmarkChangeProcessor::PlaceSyncNode(..).
TEST_F(SyncManagerTest, CreateLocalBookmark) {
std::string title = "title";
- GURL url("url");
+ std::string url = "url";
{
WriteTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
ReadNode root_node(&trans);
@@ -2132,7 +2132,10 @@ TEST_F(SyncManagerTest, CreateLocalBookmark) {
ASSERT_TRUE(node.InitByCreation(BOOKMARKS, root_node, NULL));
node.SetIsFolder(false);
node.SetTitle(UTF8ToWide(title));
- node.SetURL(url);
+
+ sync_pb::BookmarkSpecifics bookmark_specifics(node.GetBookmarkSpecifics());
+ bookmark_specifics.set_url(url);
+ node.SetBookmarkSpecifics(bookmark_specifics);
}
{
ReadTransaction trans(FROM_HERE, sync_manager_.GetUserShare());
@@ -2144,7 +2147,7 @@ TEST_F(SyncManagerTest, CreateLocalBookmark) {
ASSERT_EQ(BaseNode::INIT_OK, node.InitByIdLookup(child_id));
EXPECT_FALSE(node.GetIsFolder());
EXPECT_EQ(title, node.GetTitle());
- EXPECT_EQ(url, node.GetURL());
+ EXPECT_EQ(url, node.GetBookmarkSpecifics().url());
}
}
@@ -2669,7 +2672,7 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) {
EXPECT_EQ(BaseNode::INIT_OK,
node.InitByClientTagLookup(BOOKMARKS, client_tag));
EXPECT_EQ(title, node.GetTitle());
- EXPECT_EQ(GURL(url), node.GetURL());
+ EXPECT_EQ(url, node.GetBookmarkSpecifics().url());
}
{
@@ -2678,7 +2681,10 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) {
WriteNode node(&trans);
EXPECT_EQ(BaseNode::INIT_OK,
node.InitByClientTagLookup(BOOKMARKS, client_tag));
- node.SetURL(GURL(url2));
+
+ sync_pb::BookmarkSpecifics bookmark_specifics(node.GetBookmarkSpecifics());
+ bookmark_specifics.set_url(url2);
+ node.SetBookmarkSpecifics(bookmark_specifics);
}
{
@@ -2688,7 +2694,7 @@ TEST_F(SyncManagerTest, SetPreviouslyEncryptedSpecifics) {
EXPECT_EQ(BaseNode::INIT_OK,
node.InitByClientTagLookup(BOOKMARKS, client_tag));
EXPECT_EQ(title, node.GetTitle());
- EXPECT_EQ(GURL(url2), node.GetURL());
+ EXPECT_EQ(url2, node.GetBookmarkSpecifics().url());
const syncable::Entry* node_entry = node.GetEntry();
EXPECT_EQ(kEncryptedString, node_entry->Get(NON_UNIQUE_NAME));
const sync_pb::EntitySpecifics& specifics = node_entry->Get(SPECIFICS);
« no previous file with comments | « sync/internal_api/public/write_node.h ('k') | sync/internal_api/write_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698