| 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 | 5 |
| 6 #include "chrome/browser/sync/invalidations/invalidator_storage.h" | 6 #include "chrome/browser/sync/invalidations/invalidator_storage.h" |
| 7 | 7 |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "chrome/test/base/testing_pref_service.h" | 12 #include "chrome/test/base/testing_pref_service.h" |
| 13 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 15 |
| 16 using csync::InvalidationVersionMap; | 16 using syncer::InvalidationVersionMap; |
| 17 | 17 |
| 18 namespace browser_sync { | 18 namespace browser_sync { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 const char kSourceKey[] = "source"; | 22 const char kSourceKey[] = "source"; |
| 23 const char kNameKey[] = "name"; | 23 const char kNameKey[] = "name"; |
| 24 const char kMaxVersionKey[] = "max-version"; | 24 const char kMaxVersionKey[] = "max-version"; |
| 25 | 25 |
| 26 const int kChromeSyncSourceId = 1004; | 26 const int kChromeSyncSourceId = 1004; |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 TEST_F(InvalidatorStorageTest, SetGetInvalidationState) { | 314 TEST_F(InvalidatorStorageTest, SetGetInvalidationState) { |
| 315 InvalidatorStorage storage(&pref_service_); | 315 InvalidatorStorage storage(&pref_service_); |
| 316 const std::string mess("n\0tK\0\0l\344", 8); | 316 const std::string mess("n\0tK\0\0l\344", 8); |
| 317 ASSERT_FALSE(IsStringUTF8(mess)); | 317 ASSERT_FALSE(IsStringUTF8(mess)); |
| 318 | 318 |
| 319 storage.SetInvalidationState(mess); | 319 storage.SetInvalidationState(mess); |
| 320 EXPECT_EQ(mess, storage.GetInvalidationState()); | 320 EXPECT_EQ(mess, storage.GetInvalidationState()); |
| 321 } | 321 } |
| 322 | 322 |
| 323 } // namespace browser_sync | 323 } // namespace browser_sync |
| OLD | NEW |