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/notifier/sync_system_resources.h" | 5 #include "sync/notifier/sync_system_resources.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 TEST_F(SyncSystemResourcesTest, WriteState) { | 161 TEST_F(SyncSystemResourcesTest, WriteState) { |
162 sync_system_resources_.Start(); | 162 sync_system_resources_.Start(); |
163 EXPECT_CALL(mock_state_writer_, WriteState(_)); | 163 EXPECT_CALL(mock_state_writer_, WriteState(_)); |
164 // Owned by WriteState. | 164 // Owned by WriteState. |
165 MockStorageCallback mock_storage_callback; | 165 MockStorageCallback mock_storage_callback; |
166 invalidation::Status results(invalidation::Status::PERMANENT_FAILURE, | 166 invalidation::Status results(invalidation::Status::PERMANENT_FAILURE, |
167 "fake-failure"); | 167 "fake-failure"); |
168 EXPECT_CALL(mock_storage_callback, Run(_)) | 168 EXPECT_CALL(mock_storage_callback, Run(_)) |
169 .WillOnce(SaveArg<0>(&results)); | 169 .WillOnce(SaveArg<0>(&results)); |
170 sync_system_resources_.storage()->WriteKey( | 170 sync_system_resources_.storage()->WriteKey( |
171 "", "state", mock_storage_callback.CreateCallback()); | 171 std::string(), "state", mock_storage_callback.CreateCallback()); |
172 message_loop_.RunUntilIdle(); | 172 message_loop_.RunUntilIdle(); |
173 EXPECT_EQ(invalidation::Status(invalidation::Status::SUCCESS, ""), results); | 173 EXPECT_EQ(invalidation::Status(invalidation::Status::SUCCESS, std::string()), |
| 174 results); |
174 } | 175 } |
175 | 176 |
176 } // namespace | 177 } // namespace |
177 } // namespace syncer | 178 } // namespace syncer |
OLD | NEW |