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

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

Issue 1682623002: Disable the TLS version fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: atwilson comments Created 4 years, 9 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
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after
2723 loop.QuitClosure()); 2723 loop.QuitClosure());
2724 loop.Run(); 2724 loop.Run();
2725 return version_fallback_min; 2725 return version_fallback_min;
2726 } 2726 }
2727 2727
2728 } // namespace 2728 } // namespace
2729 2729
2730 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { 2730 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) {
2731 PrefService* prefs = g_browser_process->local_state(); 2731 PrefService* prefs = g_browser_process->local_state();
2732 2732
2733 const std::string new_value("tls1.2"); 2733 const std::string new_value("tls1.1");
2734 const std::string default_value( 2734 const std::string default_value(
2735 prefs->GetString(ssl_config::prefs::kSSLVersionFallbackMin)); 2735 prefs->GetString(ssl_config::prefs::kSSLVersionFallbackMin));
2736 2736
2737 EXPECT_NE(default_value, new_value); 2737 EXPECT_NE(default_value, new_value);
2738 EXPECT_NE(net::SSL_PROTOCOL_VERSION_TLS1_2, 2738 EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_2,
2739 GetSSLVersionFallbackMin(browser()->profile())); 2739 GetSSLVersionFallbackMin(browser()->profile()));
2740 2740
2741 PolicyMap policies; 2741 PolicyMap policies;
2742 policies.Set(key::kSSLVersionFallbackMin, 2742 policies.Set(key::kSSLVersionFallbackMin,
2743 POLICY_LEVEL_MANDATORY, 2743 POLICY_LEVEL_MANDATORY,
2744 POLICY_SCOPE_USER, 2744 POLICY_SCOPE_USER,
2745 POLICY_SOURCE_CLOUD, 2745 POLICY_SOURCE_CLOUD,
2746 new base::StringValue(new_value), 2746 new base::StringValue(new_value),
2747 NULL); 2747 NULL);
2748 UpdateProviderPolicy(policies); 2748 UpdateProviderPolicy(policies);
2749 2749
2750 EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_2, 2750 EXPECT_EQ(net::SSL_PROTOCOL_VERSION_TLS1_1,
2751 GetSSLVersionFallbackMin(browser()->profile())); 2751 GetSSLVersionFallbackMin(browser()->profile()));
2752 } 2752 }
2753 2753
2754 #if !defined(OS_MACOSX) 2754 #if !defined(OS_MACOSX)
2755 IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) { 2755 IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) {
2756 PolicyMap policies; 2756 PolicyMap policies;
2757 policies.Set(key::kFullscreenAllowed, 2757 policies.Set(key::kFullscreenAllowed,
2758 POLICY_LEVEL_MANDATORY, 2758 POLICY_LEVEL_MANDATORY,
2759 POLICY_SCOPE_USER, 2759 POLICY_SCOPE_USER,
2760 POLICY_SOURCE_CLOUD, 2760 POLICY_SOURCE_CLOUD,
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
3938 POLICY_SCOPE_USER, 3938 POLICY_SCOPE_USER,
3939 POLICY_SOURCE_CLOUD, 3939 POLICY_SOURCE_CLOUD,
3940 new base::FundamentalValue(false), 3940 new base::FundamentalValue(false),
3941 NULL); 3941 NULL);
3942 UpdateProviderPolicy(policies); 3942 UpdateProviderPolicy(policies);
3943 EXPECT_FALSE(display_manager->unified_desktop_enabled()); 3943 EXPECT_FALSE(display_manager->unified_desktop_enabled());
3944 } 3944 }
3945 #endif // defined(OS_CHROMEOS) 3945 #endif // defined(OS_CHROMEOS)
3946 3946
3947 } // namespace policy 3947 } // namespace policy
OLDNEW
« no previous file with comments | « no previous file | components/policy/resources/policy_templates.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698