OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" | 5 #include "chrome/browser/ui/webui/options/preferences_browsertest.h" |
6 | 6 |
7 #include <iostream> | 7 #include <iostream> |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
708 // Verify notifications when non-default values are in effect. | 708 // Verify notifications when non-default values are in effect. |
709 SetupJavaScriptTestEnvironment(pref_names_, &observed_json); | 709 SetupJavaScriptTestEnvironment(pref_names_, &observed_json); |
710 VerifyObservedPrefs(observed_json, pref_names_, | 710 VerifyObservedPrefs(observed_json, pref_names_, |
711 decorated_non_default_values.get(), | 711 decorated_non_default_values.get(), |
712 std::string(), false, false); | 712 std::string(), false, false); |
713 } | 713 } |
714 | 714 |
715 class ManagedPreferencesBrowserTest : public PreferencesBrowserTest { | 715 class ManagedPreferencesBrowserTest : public PreferencesBrowserTest { |
716 protected: | 716 protected: |
717 // PreferencesBrowserTest implementation: | 717 // PreferencesBrowserTest implementation: |
718 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 718 virtual void SetUpInProcessBrowserTestFixture() override { |
719 // Set up fake install attributes. | 719 // Set up fake install attributes. |
720 scoped_ptr<policy::StubEnterpriseInstallAttributes> attributes( | 720 scoped_ptr<policy::StubEnterpriseInstallAttributes> attributes( |
721 new policy::StubEnterpriseInstallAttributes()); | 721 new policy::StubEnterpriseInstallAttributes()); |
722 attributes->SetDomain("example.com"); | 722 attributes->SetDomain("example.com"); |
723 attributes->SetRegistrationUser("user@example.com"); | 723 attributes->SetRegistrationUser("user@example.com"); |
724 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( | 724 policy::BrowserPolicyConnectorChromeOS::SetInstallAttributesForTesting( |
725 attributes.release()); | 725 attributes.release()); |
726 | 726 |
727 PreferencesBrowserTest::SetUpInProcessBrowserTestFixture(); | 727 PreferencesBrowserTest::SetUpInProcessBrowserTestFixture(); |
728 } | 728 } |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 } | 806 } |
807 | 807 |
808 namespace { | 808 namespace { |
809 | 809 |
810 const char* kUserProfilePath = "user_profile"; | 810 const char* kUserProfilePath = "user_profile"; |
811 | 811 |
812 } // namespace | 812 } // namespace |
813 | 813 |
814 class ProxyPreferencesBrowserTest : public PreferencesBrowserTest { | 814 class ProxyPreferencesBrowserTest : public PreferencesBrowserTest { |
815 public: | 815 public: |
816 virtual void SetUpOnMainThread() OVERRIDE { | 816 virtual void SetUpOnMainThread() override { |
817 SetupNetworkEnvironment(); | 817 SetupNetworkEnvironment(); |
818 content::RunAllPendingInMessageLoop(); | 818 content::RunAllPendingInMessageLoop(); |
819 | 819 |
820 scoped_ptr<base::DictionaryValue> proxy_config_dict( | 820 scoped_ptr<base::DictionaryValue> proxy_config_dict( |
821 ProxyConfigDictionary::CreateFixedServers("127.0.0.1:8080", | 821 ProxyConfigDictionary::CreateFixedServers("127.0.0.1:8080", |
822 "*.google.com, 1.2.3.4:22")); | 822 "*.google.com, 1.2.3.4:22")); |
823 | 823 |
824 ProxyConfigDictionary proxy_config(proxy_config_dict.get()); | 824 ProxyConfigDictionary proxy_config(proxy_config_dict.get()); |
825 | 825 |
826 const chromeos::NetworkState* network = GetDefaultNetwork(); | 826 const chromeos::NetworkState* network = GetDefaultNetwork(); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 SetProxyPref(chromeos::kProxyHttpsPort, base::FundamentalValue(2)); | 1079 SetProxyPref(chromeos::kProxyHttpsPort, base::FundamentalValue(2)); |
1080 SetProxyPref(chromeos::kProxyFtpPort, base::FundamentalValue(3)); | 1080 SetProxyPref(chromeos::kProxyFtpPort, base::FundamentalValue(3)); |
1081 SetProxyPref(chromeos::kProxySocksPort, base::FundamentalValue(4)); | 1081 SetProxyPref(chromeos::kProxySocksPort, base::FundamentalValue(4)); |
1082 | 1082 |
1083 VerifyCurrentProxyServer( | 1083 VerifyCurrentProxyServer( |
1084 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", | 1084 "http=a.com:1;https=4.3.2.1:2;ftp=c.com:3;socks=socks4://d.com:4", |
1085 onc::ONC_SOURCE_NONE); | 1085 onc::ONC_SOURCE_NONE); |
1086 } | 1086 } |
1087 | 1087 |
1088 #endif | 1088 #endif |
OLD | NEW |