| 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 "components/sync/device_info/local_device_info_provider_impl.h" | 5 #include "components/sync/device_info/local_device_info_provider_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "components/sync/base/get_session_name.h" | 11 #include "components/sync/base/get_session_name.h" |
| 12 #include "components/version_info/version_string.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 14 |
| 14 namespace syncer { | 15 namespace syncer { |
| 15 | 16 |
| 16 const char kLocalDeviceGuid[] = "foo"; | 17 const char kLocalDeviceGuid[] = "foo"; |
| 17 const char kSigninScopedDeviceId[] = "device_id"; | 18 const char kSigninScopedDeviceId[] = "device_id"; |
| 18 | 19 |
| 19 class LocalDeviceInfoProviderImplTest : public testing::Test { | 20 class LocalDeviceInfoProviderImplTest : public testing::Test { |
| 20 public: | 21 public: |
| 21 LocalDeviceInfoProviderImplTest() : called_back_(false) {} | 22 LocalDeviceInfoProviderImplTest() : called_back_(false) {} |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 EXPECT_EQ(guid2, provider_->GetLocalSyncCacheGUID()); | 136 EXPECT_EQ(guid2, provider_->GetLocalSyncCacheGUID()); |
| 136 | 137 |
| 137 FinishInitializeProvider(); | 138 FinishInitializeProvider(); |
| 138 const DeviceInfo* local_device_info = provider_->GetLocalDeviceInfo(); | 139 const DeviceInfo* local_device_info = provider_->GetLocalDeviceInfo(); |
| 139 ASSERT_NE(nullptr, local_device_info); | 140 ASSERT_NE(nullptr, local_device_info); |
| 140 EXPECT_EQ(guid2, local_device_info->guid()); | 141 EXPECT_EQ(guid2, local_device_info->guid()); |
| 141 EXPECT_EQ(guid2, provider_->GetLocalSyncCacheGUID()); | 142 EXPECT_EQ(guid2, provider_->GetLocalSyncCacheGUID()); |
| 142 } | 143 } |
| 143 | 144 |
| 144 } // namespace syncer | 145 } // namespace syncer |
| OLD | NEW |