| 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 "components/sync/engine_impl/syncer_proto_util.h" | 5 #include "components/sync/engine_impl/syncer_proto_util.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "components/sync/base/cancelation_signal.h" | 9 #include "components/sync/base/cancelation_signal.h" |
| 10 #include "components/sync/base/model_type_test_util.h" | 10 #include "components/sync/base/model_type_test_util.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 CancelationSignal signal; | 241 CancelationSignal signal; |
| 242 DummyConnectionManager dcm(&signal); | 242 DummyConnectionManager dcm(&signal); |
| 243 ClientToServerMessage msg; | 243 ClientToServerMessage msg; |
| 244 SyncerProtoUtil::SetProtocolVersion(&msg); | 244 SyncerProtoUtil::SetProtocolVersion(&msg); |
| 245 msg.set_share("required"); | 245 msg.set_share("required"); |
| 246 msg.set_message_contents(ClientToServerMessage::GET_UPDATES); | 246 msg.set_message_contents(ClientToServerMessage::GET_UPDATES); |
| 247 sync_pb::ClientToServerResponse response; | 247 sync_pb::ClientToServerResponse response; |
| 248 | 248 |
| 249 dcm.set_send_error(true); | 249 dcm.set_send_error(true); |
| 250 EXPECT_FALSE( | 250 EXPECT_FALSE( |
| 251 SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, msg, &response)); | 251 SyncerProtoUtil::PostAndProcessHeaders(&dcm, nullptr, msg, &response)); |
| 252 | 252 |
| 253 dcm.set_send_error(false); | 253 dcm.set_send_error(false); |
| 254 EXPECT_TRUE( | 254 EXPECT_TRUE( |
| 255 SyncerProtoUtil::PostAndProcessHeaders(&dcm, NULL, msg, &response)); | 255 SyncerProtoUtil::PostAndProcessHeaders(&dcm, nullptr, msg, &response)); |
| 256 } | 256 } |
| 257 | 257 |
| 258 } // namespace syncer | 258 } // namespace syncer |
| OLD | NEW |