| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "net/base/default_trusted_spdy_proxy_provider.h" |
| 6 |
| 7 #include <string> |
| 8 |
| 9 #include "net/proxy/proxy_server.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 |
| 12 namespace net { |
| 13 |
| 14 namespace { |
| 15 |
| 16 // Tests that DefaultTrustedSpdyProxyProvider returns the proxy that is set |
| 17 // during the time of its construction. |
| 18 TEST(DefaultTrustedSpdyProxyProviderTest, ReturnsCorrectProxy) { |
| 19 const std::string proxy = "example.com:80"; |
| 20 DefaultTrustedSpdyProxyProvider trusted_spdy_proxy_provider( |
| 21 net::ProxyServer::FromURI(proxy, net::ProxyServer::SCHEME_HTTP)); |
| 22 |
| 23 ProxyServer get_proxy; |
| 24 trusted_spdy_proxy_provider.GetTrustedSpdyProxy(&get_proxy); |
| 25 EXPECT_EQ(proxy, get_proxy.ToURI()); |
| 26 } |
| 27 |
| 28 } // namespace |
| 29 |
| 30 } // namespace net |
| OLD | NEW |