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

Side by Side Diff: sync/sessions/status_controller_unittest.cc

Issue 72403003: sync: Per-type update application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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 "sync/sessions/sync_session.h" 5 #include "sync/sessions/sync_session.h"
6 #include "sync/test/engine/test_id_factory.h" 6 #include "sync/test/engine/test_id_factory.h"
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace syncer { 9 namespace syncer {
10 namespace sessions { 10 namespace sessions {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 TEST_F(StatusControllerTest, TotalNumConflictingItems) { 45 TEST_F(StatusControllerTest, TotalNumConflictingItems) {
46 StatusController status; 46 StatusController status;
47 EXPECT_EQ(0, status.TotalNumConflictingItems()); 47 EXPECT_EQ(0, status.TotalNumConflictingItems());
48 48
49 status.increment_num_server_conflicts(); 49 status.increment_num_server_conflicts();
50 status.increment_num_hierarchy_conflicts_by(3); 50 status.increment_num_hierarchy_conflicts_by(3);
51 status.increment_num_encryption_conflicts_by(2); 51 status.increment_num_encryption_conflicts_by(2);
52 EXPECT_EQ(6, status.TotalNumConflictingItems()); 52 EXPECT_EQ(6, status.TotalNumConflictingItems());
53 } 53 }
54 54
55 // Basic test that non group-restricted state accessors don't cause violations.
56 TEST_F(StatusControllerTest, Unrestricted) {
57 StatusController status;
58 status.model_neutral_state();
59 status.download_updates_succeeded();
60 status.ServerSaysNothingMoreToDownload();
61 status.group_restriction();
62 }
63
64 } // namespace sessions 55 } // namespace sessions
65 } // namespace syncer 56 } // namespace syncer
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698