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

Side by Side Diff: sync/engine/syncer_unittest.cc

Issue 24579003: Clean up remaining unused globals (on mac). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: staticmedia Created 7 years, 2 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Syncer unit tests. Unfortunately a lot of these tests 5 // Syncer unit tests. Unfortunately a lot of these tests
6 // are outdated and need to be reworked and updated. 6 // are outdated and need to be reworked and updated.
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <list> 10 #include <list>
(...skipping 3231 matching lines...) Expand 10 before | Expand all | Expand 10 after
3242 syncable::ReadTransaction rtrans(FROM_HERE, directory()); 3242 syncable::ReadTransaction rtrans(FROM_HERE, directory());
3243 Entry good_entry(&rtrans, syncable::GET_BY_ID, ids_.FromNumber(1)); 3243 Entry good_entry(&rtrans, syncable::GET_BY_ID, ids_.FromNumber(1));
3244 ASSERT_TRUE(good_entry.good()); 3244 ASSERT_TRUE(good_entry.good());
3245 EXPECT_FALSE(good_entry.GetIsUnappliedUpdate()); 3245 EXPECT_FALSE(good_entry.GetIsUnappliedUpdate());
3246 Entry bad_parent(&rtrans, syncable::GET_BY_ID, ids_.FromNumber(2)); 3246 Entry bad_parent(&rtrans, syncable::GET_BY_ID, ids_.FromNumber(2));
3247 ASSERT_TRUE(bad_parent.good()); 3247 ASSERT_TRUE(bad_parent.good());
3248 EXPECT_TRUE(bad_parent.GetIsUnappliedUpdate()); 3248 EXPECT_TRUE(bad_parent.GetIsUnappliedUpdate());
3249 } 3249 }
3250 } 3250 }
3251 3251
3252 const char kRootId[] = "0";
3253
3254 TEST_F(SyncerTest, DirectoryUpdateTest) { 3252 TEST_F(SyncerTest, DirectoryUpdateTest) {
3255 Id in_root_id = ids_.NewServerId(); 3253 Id in_root_id = ids_.NewServerId();
3256 Id in_in_root_id = ids_.NewServerId(); 3254 Id in_in_root_id = ids_.NewServerId();
3257 3255
3258 mock_server_->AddUpdateDirectory(in_root_id, TestIdFactory::root(), 3256 mock_server_->AddUpdateDirectory(in_root_id, TestIdFactory::root(),
3259 "in_root_name", 2, 2, 3257 "in_root_name", 2, 2,
3260 foreign_cache_guid(), "-1"); 3258 foreign_cache_guid(), "-1");
3261 mock_server_->AddUpdateDirectory(in_in_root_id, in_root_id, 3259 mock_server_->AddUpdateDirectory(in_in_root_id, in_root_id,
3262 "in_in_root_name", 3, 3, 3260 "in_in_root_name", 3, 3,
3263 foreign_cache_guid(), "-2"); 3261 foreign_cache_guid(), "-2");
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
4750 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id); 4748 EXPECT_EQ("xyz", final_monitor_records["xyz"].extension_id);
4751 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count); 4749 EXPECT_EQ(2049U, final_monitor_records["ABC"].bookmark_write_count);
4752 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count); 4750 EXPECT_EQ(4U, final_monitor_records["xyz"].bookmark_write_count);
4753 } else { 4751 } else {
4754 EXPECT_TRUE(final_monitor_records.empty()) 4752 EXPECT_TRUE(final_monitor_records.empty())
4755 << "Should not restore records after successful bookmark commit."; 4753 << "Should not restore records after successful bookmark commit.";
4756 } 4754 }
4757 } 4755 }
4758 4756
4759 } // namespace syncer 4757 } // namespace syncer
OLDNEW
« no previous file with comments | « skia/ext/platform_canvas_unittest.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698