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..0952ceda0b68d851de8a976ceadb02881cb44a77 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,25 @@ TEST_F(IOThreadTest, SpdyCommandLineUseSpdyOff) { |
EXPECT_EQ(0u, globals_.next_protos.size()); |
} |
+// Tests that the trusted SPDY proxy is set correctly from the command line |
+// switch. |
+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); |
bengr
2016/01/11 22:29:35
Once you fix things up so that everything uses Pro
tbansal1
2016/01/12 20:50:51
Done.
|
+ command_line_.AppendSwitchASCII(switches::kTrustedSpdyProxy, |
+ proxy.host_port_pair().ToString()); |
+ |
+ ConfigureSpdyGlobals(); |
+ net::ProxyServer got_trusted_spdy_proxy; |
bengr
2016/01/11 22:29:35
Call this trusted_spdy_proxy.
tbansal1
2016/01/12 20:50:51
obsolete.
|
+ 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(); |