| 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/macros.h" | 5 #include "base/macros.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "mojo/public/cpp/application/application_connection.h" | 7 #include "mojo/public/cpp/application/application_connection.h" |
| 8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
| 9 #include "mojo/public/cpp/application/application_test_base.h" | 9 #include "mojo/public/cpp/application/application_test_base.h" |
| 10 #include "mojo/public/cpp/bindings/strong_binding.h" | 10 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 11 #include "mojo/public/cpp/system/data_pipe.h" | 11 #include "mojo/public/cpp/system/data_pipe.h" |
| 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 12 #include "mojo/services/network/interfaces/network_service.mojom.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 namespace service { | 16 namespace service { |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 const char kMessage[] = "Hello World\n"; | 19 const char kMessage[] = "Hello World\n"; |
| 20 const char kUrl1[] = "http://www.example.com/url1"; | 20 const char kUrl1[] = "http://www.example.com/url1"; |
| 21 const char kUrl2[] = "http://www.example.com/url2"; | 21 const char kUrl2[] = "http://www.example.com/url2"; |
| 22 const char kHeaderName[] = "X-Interceptor-Header"; | 22 const char kHeaderName[] = "X-Interceptor-Header"; |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 AddInterceptor<CheckCallsInterceptor>(); | 285 AddInterceptor<CheckCallsInterceptor>(); |
| 286 | 286 |
| 287 URLResponsePtr response = GetResponse(kUrl1); | 287 URLResponsePtr response = GetResponse(kUrl1); |
| 288 EXPECT_TRUE(response); | 288 EXPECT_TRUE(response); |
| 289 EXPECT_EQ(kUrl1, response->url); | 289 EXPECT_EQ(kUrl1, response->url); |
| 290 EXPECT_EQ(1u, response->headers.size()); | 290 EXPECT_EQ(1u, response->headers.size()); |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace service | 293 } // namespace service |
| 294 } // namespace mojo | 294 } // namespace mojo |
| OLD | NEW |