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/basictypes.h" | |
6 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
| 6 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "components/component_updater/request_sender.h" | 10 #include "components/component_updater/request_sender.h" |
11 #include "components/component_updater/test/test_configurator.h" | 11 #include "components/component_updater/test/test_configurator.h" |
12 #include "components/component_updater/test/url_request_post_interceptor.h" | 12 #include "components/component_updater/test/url_request_post_interceptor.h" |
13 #include "net/url_request/url_fetcher.h" | 13 #include "net/url_request/url_fetcher.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace component_updater { | 16 namespace component_updater { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 EXPECT_EQ(1, post_interceptor_2->GetCount()) | 201 EXPECT_EQ(1, post_interceptor_2->GetCount()) |
202 << post_interceptor_2->GetRequestsAsString(); | 202 << post_interceptor_2->GetRequestsAsString(); |
203 | 203 |
204 EXPECT_STREQ("test", post_interceptor_1->GetRequests()[0].c_str()); | 204 EXPECT_STREQ("test", post_interceptor_1->GetRequests()[0].c_str()); |
205 EXPECT_STREQ("test", post_interceptor_2->GetRequests()[0].c_str()); | 205 EXPECT_STREQ("test", post_interceptor_2->GetRequests()[0].c_str()); |
206 EXPECT_EQ(GURL(kUrl2), url_fetcher_source_->GetOriginalURL()); | 206 EXPECT_EQ(GURL(kUrl2), url_fetcher_source_->GetOriginalURL()); |
207 EXPECT_EQ(403, url_fetcher_source_->GetResponseCode()); | 207 EXPECT_EQ(403, url_fetcher_source_->GetResponseCode()); |
208 } | 208 } |
209 | 209 |
210 } // namespace component_updater | 210 } // namespace component_updater |
OLD | NEW |