Chromium Code Reviews| Index: chrome/browser/io_thread_unittest.cc |
| diff --git a/chrome/browser/io_thread_unittest.cc b/chrome/browser/io_thread_unittest.cc |
| index f3321ee333ee20d0974201282fab9850204c03a9..44a8425fc52aa6eba60c70828f384a2eec26c72f 100644 |
| --- a/chrome/browser/io_thread_unittest.cc |
| +++ b/chrome/browser/io_thread_unittest.cc |
| @@ -23,10 +23,13 @@ |
| #include "components/proxy_config/proxy_config_pref_names.h" |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/test/test_browser_thread_bundle.h" |
| +#include "net/base/host_port_pair.h" |
| +#include "net/base/trusted_spdy_proxy_provider.h" |
| #include "net/http/http_auth_preferences.h" |
| #include "net/http/http_auth_scheme.h" |
| #include "net/http/http_network_session.h" |
| #include "net/http/http_server_properties_impl.h" |
| +#include "net/proxy/proxy_server.h" |
| #include "net/quic/quic_protocol.h" |
| #include "net/quic/quic_stream_factory.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| @@ -183,6 +186,24 @@ TEST_F(IOThreadTest, SpdyCommandLineUseSpdyOff) { |
| EXPECT_EQ(0u, globals_.next_protos.size()); |
| } |
| +// Tests that trusted SPDY proxy is set correctly from the command line switch. |
|
bengr
2016/01/12 21:43:03
It seems you lost some changes.
Add the "the" bac
tbansal1
2016/01/12 23:43:49
Done.
|
| +TEST_F(IOThreadTest, TrustedSpdyProxy) { |
| + // When command line flag is unspecified, the proxy provider is unavailable. |
| + ConfigureSpdyGlobals(); |
| + EXPECT_FALSE(globals_.trusted_spdy_proxy_provider); |
| + |
| + const net::ProxyServer proxy = net::ProxyServer::FromURI( |
| + "example.com:443", net::ProxyServer::SCHEME_HTTP); |
| + command_line_.AppendSwitchASCII(switches::kTrustedSpdyProxy, |
| + proxy.host_port_pair().ToString()); |
| + |
| + ConfigureSpdyGlobals(); |
| + net::ProxyServer got_trusted_spdy_proxy; |
| + globals_.trusted_spdy_proxy_provider->GetTrustedSpdyProxy( |
| + &got_trusted_spdy_proxy); |
| + EXPECT_EQ(proxy, got_trusted_spdy_proxy); |
| +} |
| + |
| TEST_F(IOThreadTest, NPNFieldTrialEnabled) { |
| field_trial_group_ = "Enable-experiment"; |
| ConfigureNPNGlobals(); |