Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: net/base/default_trusted_spdy_proxy_provider_unittest.cc

Issue 1547273003: Set trusted SPDY proxy dynamically on per-profile basis (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/default_trusted_spdy_proxy_provider_unittest.cc
diff --git a/net/base/default_trusted_spdy_proxy_provider_unittest.cc b/net/base/default_trusted_spdy_proxy_provider_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..53d07057245bc527c992f505e43d43172a67d5ff
--- /dev/null
+++ b/net/base/default_trusted_spdy_proxy_provider_unittest.cc
@@ -0,0 +1,30 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/base/default_trusted_spdy_proxy_provider.h"
+
+#include <string>
+
+#include "net/proxy/proxy_server.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace net {
+
+namespace {
+
+// Tests that DefaultTrustedSpdyProxyProvider returns the proxy that is set
+// during the time of its construction.
+TEST(DefaultTrustedSpdyProxyProviderTest, ReturnsCorrectProxy) {
+ const std::string proxy = "example.com:80";
+ DefaultTrustedSpdyProxyProvider trusted_spdy_proxy_provider(
+ net::ProxyServer::FromURI(proxy, net::ProxyServer::SCHEME_HTTP));
+
+ ProxyServer get_proxy;
+ trusted_spdy_proxy_provider.GetTrustedSpdyProxy(&get_proxy);
+ EXPECT_EQ(proxy, get_proxy.ToURI());
+}
+
+} // namespace
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698