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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 1320533007: Componentize ssl_config_service_manager_pref.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed pref_service_mock_factory.h dependency from unittest Created 5 years, 3 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 unified diff | Download patch
OLDNEW
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 #include "components/policy/core/browser/browser_policy_connector.h" 95 #include "components/policy/core/browser/browser_policy_connector.h"
96 #include "components/policy/core/common/external_data_fetcher.h" 96 #include "components/policy/core/common/external_data_fetcher.h"
97 #include "components/policy/core/common/mock_configuration_policy_provider.h" 97 #include "components/policy/core/common/mock_configuration_policy_provider.h"
98 #include "components/policy/core/common/policy_map.h" 98 #include "components/policy/core/common/policy_map.h"
99 #include "components/policy/core/common/policy_pref_names.h" 99 #include "components/policy/core/common/policy_pref_names.h"
100 #include "components/policy/core/common/policy_service.h" 100 #include "components/policy/core/common/policy_service.h"
101 #include "components/policy/core/common/policy_service_impl.h" 101 #include "components/policy/core/common/policy_service_impl.h"
102 #include "components/search/search.h" 102 #include "components/search/search.h"
103 #include "components/search_engines/template_url.h" 103 #include "components/search_engines/template_url.h"
104 #include "components/search_engines/template_url_service.h" 104 #include "components/search_engines/template_url_service.h"
105 #include "components/ssl_config/ssl_config_prefs.h"
105 #include "components/translate/core/browser/language_state.h" 106 #include "components/translate/core/browser/language_state.h"
106 #include "components/translate/core/browser/translate_infobar_delegate.h" 107 #include "components/translate/core/browser/translate_infobar_delegate.h"
107 #include "components/variations/service/variations_service.h" 108 #include "components/variations/service/variations_service.h"
108 #include "components/version_info/version_info.h" 109 #include "components/version_info/version_info.h"
109 #include "content/public/browser/browser_child_process_host_iterator.h" 110 #include "content/public/browser/browser_child_process_host_iterator.h"
110 #include "content/public/browser/browser_context.h" 111 #include "content/public/browser/browser_context.h"
111 #include "content/public/browser/browser_thread.h" 112 #include "content/public/browser/browser_thread.h"
112 #include "content/public/browser/child_process_data.h" 113 #include "content/public/browser/child_process_data.h"
113 #include "content/public/browser/download_item.h" 114 #include "content/public/browser/download_item.h"
114 #include "content/public/browser/download_manager.h" 115 #include "content/public/browser/download_manager.h"
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after
2663 return version_fallback_min; 2664 return version_fallback_min;
2664 } 2665 }
2665 2666
2666 } // namespace 2667 } // namespace
2667 2668
2668 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { 2669 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) {
2669 PrefService* prefs = g_browser_process->local_state(); 2670 PrefService* prefs = g_browser_process->local_state();
2670 2671
2671 const std::string new_value("tls1.2"); 2672 const std::string new_value("tls1.2");
2672 const std::string default_value( 2673 const std::string default_value(
2673 prefs->GetString(prefs::kSSLVersionFallbackMin)); 2674 prefs->GetString(ssl_config::prefs::kSSLVersionFallbackMin));
2674 2675
2675 EXPECT_NE(default_value, new_value); 2676 EXPECT_NE(default_value, new_value);
2676 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2, 2677 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2,
2677 GetSSLVersionFallbackMin(browser()->profile())); 2678 GetSSLVersionFallbackMin(browser()->profile()));
2678 2679
2679 PolicyMap policies; 2680 PolicyMap policies;
2680 policies.Set(key::kSSLVersionFallbackMin, 2681 policies.Set(key::kSSLVersionFallbackMin,
2681 POLICY_LEVEL_MANDATORY, 2682 POLICY_LEVEL_MANDATORY,
2682 POLICY_SCOPE_USER, 2683 POLICY_SCOPE_USER,
2683 new base::StringValue(new_value), 2684 new base::StringValue(new_value),
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
3863 3864
3864 IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest, 3865 IN_PROC_BROWSER_TEST_F(HardwareAccelerationModePolicyTest,
3865 HardwareAccelerationDisabled) { 3866 HardwareAccelerationDisabled) {
3866 // Verifies that hardware acceleration can be disabled with policy. 3867 // Verifies that hardware acceleration can be disabled with policy.
3867 EXPECT_FALSE( 3868 EXPECT_FALSE(
3868 content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr)); 3869 content::GpuDataManager::GetInstance()->GpuAccessAllowed(nullptr));
3869 } 3870 }
3870 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) 3871 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
3871 3872
3872 } // namespace policy 3873 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698