| 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 4b2f79bc55a06226ed932230123e07f86b31fa6e..ec35e5a009bbf803e2a1453c44b06e3f6bcff695 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,7 +26,9 @@
|
| #include "url/gurl.h"
|
|
|
| const char kDataReductionProxyOrigin[] = "https://foo:443/";
|
| -const char kDataReductionProxyOriginHostPort[] = "foo:443";
|
| +const char kDataReductionProxyOriginPAC[] = "HTTPS foo:443;";
|
| +const char kDataReductionProxyFallback[] = "http://bar:80/";
|
| +const char kDataReductionProxyFallbackPAC[] = "HTTP bar:80;";
|
| const char kDataReductionProxyAuth[] = "12345";
|
|
|
| class TestDataReductionProxySettingsAndroid
|
| @@ -132,33 +134,6 @@ TEST_F(DataReductionProxySettingsAndroidTest, TestGetDataReductionProxyOrigin) {
|
| EXPECT_EQ(kDataReductionProxyOrigin, ConvertJavaStringToUTF8(str_ref));
|
| }
|
|
|
| -TEST_F(DataReductionProxySettingsAndroidTest, TestGetDataReductionProxyAuth) {
|
| - AddProxyToCommandLine();
|
| - // SetUp() adds the auth string to the command line, which should be returned
|
| - // here.
|
| - ScopedJavaLocalRef<jstring> result =
|
| - settings_->GetDataReductionProxyAuth(env_, NULL);
|
| - ASSERT_TRUE(result.obj());
|
| - const base::android::JavaRef<jstring>& str_ref = result;
|
| - EXPECT_EQ(kDataReductionProxyAuth, ConvertJavaStringToUTF8(str_ref));
|
| -}
|
| -
|
| -// Test that the auth value set by preprocessor directive is not returned
|
| -// when an origin is set via a switch. This test only does anything useful in
|
| -// Chrome builds.
|
| -TEST_F(DataReductionProxySettingsAndroidTest,
|
| - TestGetDataReductionProxyAuthWithOriginSetViaSwitch) {
|
| - CommandLine::ForCurrentProcess()->AppendSwitchASCII(
|
| - switches::kSpdyProxyAuthOrigin, kDataReductionProxyOrigin);
|
| - // SetUp() adds the auth string to the command line, which should be returned
|
| - // here.
|
| - ScopedJavaLocalRef<jstring> result =
|
| - settings_->GetDataReductionProxyAuth(env_, NULL);
|
| - ASSERT_TRUE(result.obj());
|
| - const base::android::JavaRef<jstring>& str_ref = result;
|
| - EXPECT_EQ(std::string(), ConvertJavaStringToUTF8(str_ref));
|
| -}
|
| -
|
| // Confirm that the bypass rule functions generate the intended JavaScript
|
| // code for the Proxy PAC.
|
| TEST_F(DataReductionProxySettingsAndroidTest, TestBypassPACRules) {
|
| @@ -174,9 +149,13 @@ TEST_F(DataReductionProxySettingsAndroidTest, TestBypassPACRules) {
|
| }
|
|
|
| TEST_F(DataReductionProxySettingsAndroidTest, TestSetProxyPac) {
|
| + AddProxyToCommandLine();
|
| settings_->AddDefaultProxyBypassRules();
|
| + std::string raw_pac = settings_->GetProxyPacScript();
|
| + EXPECT_NE(raw_pac.find(kDataReductionProxyOriginPAC), std::string::npos);
|
| + EXPECT_NE(raw_pac.find(kDataReductionProxyFallbackPAC), std::string::npos);;
|
| std::string pac;
|
| - base::Base64Encode(settings_->GetProxyPacScript(), &pac);
|
| + base::Base64Encode(raw_pac, &pac);
|
| std::string expected_pac_url =
|
| "data:application/x-ns-proxy-autoconfig;base64," + pac;
|
| // Test setting the PAC, without generating histograms.
|
|
|