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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc

Issue 105833010: Added Dev host for data reduction proxy controlled by Finch experiment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync to head. Created 6 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: chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
index bc40bf1393a792ce5e3828695be2f4a08c1b8f52..faa83f049e098c91c7d25d0bb5842307d6088e40 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest_android.cc
@@ -26,6 +26,7 @@
#include "url/gurl.h"
const char kDataReductionProxyOrigin[] = "https://foo.com:443/";
+const char kDataReductionProxyDevHost[] = "http://foo-dev.com:80";
const char kDataReductionProxyOriginPAC[] = "HTTPS foo.com:443;";
const char kDataReductionProxyFallbackPAC[] = "PROXY bar.com:80;";
@@ -69,6 +70,18 @@ TEST_F(DataReductionProxySettingsAndroidTest, TestGetDataReductionProxyOrigin) {
EXPECT_EQ(kDataReductionProxyOrigin, ConvertJavaStringToUTF8(str_ref));
}
+TEST_F(DataReductionProxySettingsAndroidTest,
+ TestGetDataReductionProxyDevOrigin) {
+ AddProxyToCommandLine();
+ CommandLine::ForCurrentProcess()->AppendSwitchASCII(
+ switches::kSpdyProxyDevAuthOrigin, kDataReductionProxyDevHost);
+ ScopedJavaLocalRef<jstring> result =
+ Settings()->GetDataReductionProxyOrigin(env_, NULL);
+ ASSERT_TRUE(result.obj());
+ const base::android::JavaRef<jstring>& str_ref = result;
+ EXPECT_EQ(kDataReductionProxyDevHost, ConvertJavaStringToUTF8(str_ref));
+}
+
// Confirm that the bypass rule functions generate the intended JavaScript
// code for the Proxy PAC.
TEST_F(DataReductionProxySettingsAndroidTest, TestBypassPACRules) {
« no previous file with comments | « chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698