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

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: move unittest to components/ssl_config Created 5 years, 2 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 "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 #include "components/policy/core/common/external_data_fetcher.h" 98 #include "components/policy/core/common/external_data_fetcher.h"
99 #include "components/policy/core/common/mock_configuration_policy_provider.h" 99 #include "components/policy/core/common/mock_configuration_policy_provider.h"
100 #include "components/policy/core/common/policy_map.h" 100 #include "components/policy/core/common/policy_map.h"
101 #include "components/policy/core/common/policy_pref_names.h" 101 #include "components/policy/core/common/policy_pref_names.h"
102 #include "components/policy/core/common/policy_service.h" 102 #include "components/policy/core/common/policy_service.h"
103 #include "components/policy/core/common/policy_service_impl.h" 103 #include "components/policy/core/common/policy_service_impl.h"
104 #include "components/policy/core/common/policy_types.h" 104 #include "components/policy/core/common/policy_types.h"
105 #include "components/search/search.h" 105 #include "components/search/search.h"
106 #include "components/search_engines/template_url.h" 106 #include "components/search_engines/template_url.h"
107 #include "components/search_engines/template_url_service.h" 107 #include "components/search_engines/template_url_service.h"
108 #include "components/ssl_config/ssl_config_prefs.h"
108 #include "components/translate/core/browser/language_state.h" 109 #include "components/translate/core/browser/language_state.h"
109 #include "components/translate/core/browser/translate_infobar_delegate.h" 110 #include "components/translate/core/browser/translate_infobar_delegate.h"
110 #include "components/variations/service/variations_service.h" 111 #include "components/variations/service/variations_service.h"
111 #include "components/version_info/version_info.h" 112 #include "components/version_info/version_info.h"
112 #include "content/public/browser/browser_child_process_host_iterator.h" 113 #include "content/public/browser/browser_child_process_host_iterator.h"
113 #include "content/public/browser/browser_context.h" 114 #include "content/public/browser/browser_context.h"
114 #include "content/public/browser/browser_thread.h" 115 #include "content/public/browser/browser_thread.h"
115 #include "content/public/browser/child_process_data.h" 116 #include "content/public/browser/child_process_data.h"
116 #include "content/public/browser/download_item.h" 117 #include "content/public/browser/download_item.h"
117 #include "content/public/browser/download_manager.h" 118 #include "content/public/browser/download_manager.h"
(...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 return version_fallback_min; 2730 return version_fallback_min;
2730 } 2731 }
2731 2732
2732 } // namespace 2733 } // namespace
2733 2734
2734 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { 2735 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) {
2735 PrefService* prefs = g_browser_process->local_state(); 2736 PrefService* prefs = g_browser_process->local_state();
2736 2737
2737 const std::string new_value("tls1.2"); 2738 const std::string new_value("tls1.2");
2738 const std::string default_value( 2739 const std::string default_value(
2739 prefs->GetString(prefs::kSSLVersionFallbackMin)); 2740 prefs->GetString(ssl_config::prefs::kSSLVersionFallbackMin));
2740 2741
2741 EXPECT_NE(default_value, new_value); 2742 EXPECT_NE(default_value, new_value);
2742 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2, 2743 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2,
2743 GetSSLVersionFallbackMin(browser()->profile())); 2744 GetSSLVersionFallbackMin(browser()->profile()));
2744 2745
2745 PolicyMap policies; 2746 PolicyMap policies;
2746 policies.Set(key::kSSLVersionFallbackMin, 2747 policies.Set(key::kSSLVersionFallbackMin,
2747 POLICY_LEVEL_MANDATORY, 2748 POLICY_LEVEL_MANDATORY,
2748 POLICY_SCOPE_USER, 2749 POLICY_SCOPE_USER,
2749 POLICY_SOURCE_CLOUD, 2750 POLICY_SOURCE_CLOUD,
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
4001 POLICY_SCOPE_USER, 4002 POLICY_SCOPE_USER,
4002 POLICY_SOURCE_CLOUD, 4003 POLICY_SOURCE_CLOUD,
4003 new base::FundamentalValue(false), 4004 new base::FundamentalValue(false),
4004 NULL); 4005 NULL);
4005 UpdateProviderPolicy(policies); 4006 UpdateProviderPolicy(policies);
4006 EXPECT_FALSE(display_manager->unified_desktop_enabled()); 4007 EXPECT_FALSE(display_manager->unified_desktop_enabled());
4007 } 4008 }
4008 #endif // defined(OS_CHROMEOS) 4009 #endif // defined(OS_CHROMEOS)
4009 4010
4010 } // namespace policy 4011 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698