OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/auto_reset.h" | 6 #include "base/auto_reset.h" |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
13 #include "mojo/fetcher/network_fetcher.h" | 13 #include "mojo/fetcher/network_fetcher.h" |
14 #include "mojo/public/cpp/bindings/strong_binding.h" | |
15 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 14 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
16 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" | 15 #include "mojo/services/network/public/interfaces/url_loader_factory.mojom.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" |
18 | 18 |
19 namespace mojo { | 19 namespace mojo { |
20 namespace fetcher { | 20 namespace fetcher { |
21 namespace { | 21 namespace { |
22 | 22 |
23 const char k200Request[] = "http://request_expect_200"; | 23 const char k200Request[] = "http://request_expect_200"; |
24 const char k404Request[] = "http://request_expect_404"; | 24 const char k404Request[] = "http://request_expect_404"; |
25 const char k504Request[] = "http://request_expect_504"; | 25 const char k504Request[] = "http://request_expect_504"; |
26 const char kErrorRequest[] = "http://request_expect_error"; | 26 const char kErrorRequest[] = "http://request_expect_error"; |
27 | 27 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 TestFetchURL(k504Request, true, 504u); | 167 TestFetchURL(k504Request, true, 504u); |
168 } | 168 } |
169 | 169 |
170 TEST_F(NetworkFetcherTest, FetchFailed) { | 170 TEST_F(NetworkFetcherTest, FetchFailed) { |
171 TestFetchURL(kErrorRequest, false, 0u); | 171 TestFetchURL(kErrorRequest, false, 0u); |
172 } | 172 } |
173 | 173 |
174 } // namespace | 174 } // namespace |
175 } // namespace fetcher | 175 } // namespace fetcher |
176 } // namespace mojo | 176 } // namespace mojo |
OLD | NEW |