| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |