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/update_client/request_sender.h" | 5 #include "components/update_client/request_sender.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/path_service.h" |
11 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
12 #include "base/strings/string_util.h" | 13 #include "base/strings/string_util.h" |
13 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
14 #include "components/update_client/test_configurator.h" | 15 #include "components/update_client/test_configurator.h" |
15 #include "components/update_client/url_request_post_interceptor.h" | 16 #include "components/update_client/url_request_post_interceptor.h" |
16 #include "net/url_request/url_fetcher.h" | 17 #include "net/url_request/url_fetcher.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 | 19 |
19 namespace update_client { | 20 namespace update_client { |
20 | 21 |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 << post_interceptor_1_->GetRequestsAsString(); | 257 << post_interceptor_1_->GetRequestsAsString(); |
257 EXPECT_EQ(1, post_interceptor_1_->GetCount()) | 258 EXPECT_EQ(1, post_interceptor_1_->GetCount()) |
258 << post_interceptor_1_->GetRequestsAsString(); | 259 << post_interceptor_1_->GetRequestsAsString(); |
259 | 260 |
260 EXPECT_STREQ("test", post_interceptor_1_->GetRequests()[0].c_str()); | 261 EXPECT_STREQ("test", post_interceptor_1_->GetRequests()[0].c_str()); |
261 EXPECT_EQ(RequestSender::kErrorResponseNotTrusted, error_); | 262 EXPECT_EQ(RequestSender::kErrorResponseNotTrusted, error_); |
262 EXPECT_TRUE(response_.empty()); | 263 EXPECT_TRUE(response_.empty()); |
263 } | 264 } |
264 | 265 |
265 } // namespace update_client | 266 } // namespace update_client |
OLD | NEW |