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

Side by Side Diff: components/sync/engine_impl/cycle/nudge_tracker_unittest.cc

Issue 2389443003: [Sync] Remove special cased sessions default commit (Closed)
Patch Set: Updating custom nudge delay for favicons as well: Created 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "components/sync/engine_impl/cycle/nudge_tracker.h" 5 #include "components/sync/engine_impl/cycle/nudge_tracker.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 nudge_tracker_.RecordLocalChange(ModelTypeSet(PREFERENCES))); 738 nudge_tracker_.RecordLocalChange(ModelTypeSet(PREFERENCES)));
739 739
740 // Typed URLs has a default delay. 740 // Typed URLs has a default delay.
741 EXPECT_EQ(nudge_tracker_.RecordLocalChange(ModelTypeSet(TYPED_URLS)), 741 EXPECT_EQ(nudge_tracker_.RecordLocalChange(ModelTypeSet(TYPED_URLS)),
742 base::TimeDelta()); 742 base::TimeDelta());
743 743
744 // "Slow nudge" delays are longer than the default. 744 // "Slow nudge" delays are longer than the default.
745 EXPECT_GT(nudge_tracker_.RecordLocalChange(ModelTypeSet(BOOKMARKS)), 745 EXPECT_GT(nudge_tracker_.RecordLocalChange(ModelTypeSet(BOOKMARKS)),
746 base::TimeDelta()); 746 base::TimeDelta());
747 747
748 // Sessions is longer than "slow nudge". 748 // Sessions has a "slow nudge".
749 EXPECT_GT(nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS)), 749 EXPECT_EQ(nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS)),
750 nudge_tracker_.RecordLocalChange(ModelTypeSet(BOOKMARKS))); 750 nudge_tracker_.RecordLocalChange(ModelTypeSet(BOOKMARKS)));
751 751
752 // Favicons have the same delay as sessions. 752 // Favicons have the same delay as sessions.
753 EXPECT_EQ(nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS)), 753 EXPECT_EQ(nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS)),
754 nudge_tracker_.RecordLocalChange(ModelTypeSet(FAVICON_TRACKING))); 754 nudge_tracker_.RecordLocalChange(ModelTypeSet(FAVICON_TRACKING)));
755 755
756 // Autofill has the longer delay of all. 756 // Autofill has the longer delay of all.
757 EXPECT_GT(nudge_tracker_.RecordLocalChange(ModelTypeSet(AUTOFILL)), 757 EXPECT_GT(nudge_tracker_.RecordLocalChange(ModelTypeSet(AUTOFILL)),
758 nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS))); 758 nudge_tracker_.RecordLocalChange(ModelTypeSet(SESSIONS)));
759 759
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 EXPECT_TRUE(IsInvalidationAcknowledged(inv1_id)); 958 EXPECT_TRUE(IsInvalidationAcknowledged(inv1_id));
959 EXPECT_TRUE(IsInvalidationAcknowledged(inv2_id)); 959 EXPECT_TRUE(IsInvalidationAcknowledged(inv2_id));
960 EXPECT_TRUE(IsInvalidationAcknowledged(inv3_id)); 960 EXPECT_TRUE(IsInvalidationAcknowledged(inv3_id));
961 EXPECT_TRUE(IsInvalidationAcknowledged(inv4_id)); 961 EXPECT_TRUE(IsInvalidationAcknowledged(inv4_id));
962 EXPECT_TRUE(IsInvalidationAcknowledged(inv5_id)); 962 EXPECT_TRUE(IsInvalidationAcknowledged(inv5_id));
963 963
964 EXPECT_TRUE(AllInvalidationsAccountedFor()); 964 EXPECT_TRUE(AllInvalidationsAccountedFor());
965 } 965 }
966 966
967 } // namespace syncer 967 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine_impl/cycle/nudge_tracker.cc ('k') | components/sync/engine_impl/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698