| 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/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.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/update_client/request_sender.h" | 11 #include "components/update_client/request_sender.h" |
| 12 #include "components/update_client/test/test_configurator.h" | 12 #include "components/update_client/test_configurator.h" |
| 13 #include "components/update_client/test/url_request_post_interceptor.h" | 13 #include "components/update_client/url_request_post_interceptor.h" |
| 14 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace update_client { | 17 namespace update_client { |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 const char kUrl1[] = "https://localhost2/path1"; | 21 const char kUrl1[] = "https://localhost2/path1"; |
| 22 const char kUrl2[] = "https://localhost2/path2"; | 22 const char kUrl2[] = "https://localhost2/path2"; |
| 23 const char kUrlPath1[] = "path1"; | 23 const char kUrlPath1[] = "path1"; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 EXPECT_EQ(1, post_interceptor_2->GetCount()) | 197 EXPECT_EQ(1, post_interceptor_2->GetCount()) |
| 198 << post_interceptor_2->GetRequestsAsString(); | 198 << post_interceptor_2->GetRequestsAsString(); |
| 199 | 199 |
| 200 EXPECT_STREQ("test", post_interceptor_1->GetRequests()[0].c_str()); | 200 EXPECT_STREQ("test", post_interceptor_1->GetRequests()[0].c_str()); |
| 201 EXPECT_STREQ("test", post_interceptor_2->GetRequests()[0].c_str()); | 201 EXPECT_STREQ("test", post_interceptor_2->GetRequests()[0].c_str()); |
| 202 EXPECT_EQ(GURL(kUrl2), url_fetcher_source_->GetOriginalURL()); | 202 EXPECT_EQ(GURL(kUrl2), url_fetcher_source_->GetOriginalURL()); |
| 203 EXPECT_EQ(403, url_fetcher_source_->GetResponseCode()); | 203 EXPECT_EQ(403, url_fetcher_source_->GetResponseCode()); |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace update_client | 206 } // namespace update_client |
| OLD | NEW |