OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
8 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" | 8 #include "chrome/browser/sync/glue/local_device_info_provider_impl.h" |
9 #include "chrome/common/chrome_version_info.h" | 9 #include "chrome/common/chrome_version_info.h" |
10 #include "sync/util/get_session_name.h" | 10 #include "sync/util/get_session_name.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
| 13 using sync_driver::DeviceInfo; |
| 14 using sync_driver::LocalDeviceInfoProvider; |
| 15 |
13 namespace browser_sync { | 16 namespace browser_sync { |
14 | 17 |
15 const char kLocalDeviceGuid[] = "foo"; | 18 const char kLocalDeviceGuid[] = "foo"; |
16 const char kSigninScopedDeviceId[] = "device_id"; | 19 const char kSigninScopedDeviceId[] = "device_id"; |
17 | 20 |
18 class LocalDeviceInfoProviderTest : public testing::Test { | 21 class LocalDeviceInfoProviderTest : public testing::Test { |
19 public: | 22 public: |
20 LocalDeviceInfoProviderTest() | 23 LocalDeviceInfoProviderTest() |
21 : called_back_(false) {} | 24 : called_back_(false) {} |
22 virtual ~LocalDeviceInfoProviderTest() {} | 25 virtual ~LocalDeviceInfoProviderTest() {} |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 89 |
87 TEST_F(LocalDeviceInfoProviderTest, GetLocalSyncCacheGUID) { | 90 TEST_F(LocalDeviceInfoProviderTest, GetLocalSyncCacheGUID) { |
88 ASSERT_EQ(std::string(), provider_->GetLocalSyncCacheGUID()); | 91 ASSERT_EQ(std::string(), provider_->GetLocalSyncCacheGUID()); |
89 | 92 |
90 InitializeProvider(); | 93 InitializeProvider(); |
91 | 94 |
92 EXPECT_EQ(std::string(kLocalDeviceGuid), provider_->GetLocalSyncCacheGUID()); | 95 EXPECT_EQ(std::string(kLocalDeviceGuid), provider_->GetLocalSyncCacheGUID()); |
93 } | 96 } |
94 | 97 |
95 } // namespace browser_sync | 98 } // namespace browser_sync |
OLD | NEW |