| 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 "chrome/browser/sync/sync_prefs.h" |    5 #include "chrome/browser/sync/sync_prefs.h" | 
|    6  |    6  | 
|    7 #include "base/message_loop.h" |    7 #include "base/message_loop.h" | 
|    8 #include "base/time.h" |    8 #include "base/time.h" | 
|    9 #include "chrome/test/base/testing_pref_service.h" |    9 #include "chrome/test/base/testing_pref_service.h" | 
|   10 #include "sync/internal_api/public/base/model_type.h" |   10 #include "sync/internal_api/public/base/model_type.h" | 
|   11 #include "testing/gmock/include/gmock/gmock.h" |   11 #include "testing/gmock/include/gmock/gmock.h" | 
|   12 #include "testing/gtest/include/gtest/gtest.h" |   12 #include "testing/gtest/include/gtest/gtest.h" | 
|   13  |   13  | 
|   14 namespace browser_sync { |   14 namespace browser_sync { | 
|   15  |   15  | 
|   16 namespace { |   16 namespace { | 
|   17  |   17  | 
|   18 using ::testing::InSequence; |   18 using ::testing::InSequence; | 
|   19 using ::testing::StrictMock; |   19 using ::testing::StrictMock; | 
|   20  |   20  | 
|   21 class SyncPrefsTest : public testing::Test { |   21 class SyncPrefsTest : public testing::Test { | 
|   22  protected: |   22  protected: | 
|   23   TestingPrefService pref_service_; |   23   TestingPrefServiceSyncable pref_service_; | 
|   24  |   24  | 
|   25  private: |   25  private: | 
|   26   MessageLoop loop_; |   26   MessageLoop loop_; | 
|   27 }; |   27 }; | 
|   28  |   28  | 
|   29 // Returns all types visible from the setup UI. |   29 // Returns all types visible from the setup UI. | 
|   30 syncer::ModelTypeSet GetUserVisibleTypes() { |   30 syncer::ModelTypeSet GetUserVisibleTypes() { | 
|   31   syncer::ModelTypeSet user_visible_types(syncer::UserTypes()); |   31   syncer::ModelTypeSet user_visible_types(syncer::UserTypes()); | 
|   32   user_visible_types.Remove(syncer::APP_NOTIFICATIONS); |   32   user_visible_types.Remove(syncer::APP_NOTIFICATIONS); | 
|   33   user_visible_types.Remove(syncer::APP_SETTINGS); |   33   user_visible_types.Remove(syncer::APP_SETTINGS); | 
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  197   EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); |  197   EXPECT_FALSE(sync_prefs.HasKeepEverythingSynced()); | 
|  198   const syncer::ModelTypeSet user_types = syncer::UserTypes(); |  198   const syncer::ModelTypeSet user_types = syncer::UserTypes(); | 
|  199   EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); |  199   EXPECT_TRUE(sync_prefs.GetPreferredDataTypes(user_types).Empty()); | 
|  200   EXPECT_FALSE(sync_prefs.IsManaged()); |  200   EXPECT_FALSE(sync_prefs.IsManaged()); | 
|  201   EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); |  201   EXPECT_TRUE(sync_prefs.GetEncryptionBootstrapToken().empty()); | 
|  202 } |  202 } | 
|  203  |  203  | 
|  204 }  // namespace |  204 }  // namespace | 
|  205  |  205  | 
|  206 }  // namespace browser_sync |  206 }  // namespace browser_sync | 
| OLD | NEW |