| 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 <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 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2288   policies.Set(key::kSSLVersionMin, | 2288   policies.Set(key::kSSLVersionMin, | 
| 2289                POLICY_LEVEL_MANDATORY, | 2289                POLICY_LEVEL_MANDATORY, | 
| 2290                POLICY_SCOPE_USER, | 2290                POLICY_SCOPE_USER, | 
| 2291                new base::StringValue(new_value), | 2291                new base::StringValue(new_value), | 
| 2292                NULL); | 2292                NULL); | 
| 2293   UpdateProviderPolicy(policies); | 2293   UpdateProviderPolicy(policies); | 
| 2294 | 2294 | 
| 2295   EXPECT_TRUE(IsMinSSLVersionTLS12(browser()->profile())); | 2295   EXPECT_TRUE(IsMinSSLVersionTLS12(browser()->profile())); | 
| 2296 } | 2296 } | 
| 2297 | 2297 | 
|  | 2298 static bool IsMinSSLFallbackVersionTLS12(Profile* profile) { | 
|  | 2299   scoped_refptr<net::SSLConfigService> config_service( | 
|  | 2300       profile->GetSSLConfigService()); | 
|  | 2301   net::SSLConfig config; | 
|  | 2302   config_service->GetSSLConfig(&config); | 
|  | 2303   return config.version_fallback_min == net::SSL_PROTOCOL_VERSION_TLS1_2; | 
|  | 2304 } | 
|  | 2305 | 
|  | 2306 IN_PROC_BROWSER_TEST_F(PolicyTest, SSLVersionFallbackMin) { | 
|  | 2307   PrefService* prefs = g_browser_process->local_state(); | 
|  | 2308 | 
|  | 2309   const std::string new_value("tls1.2"); | 
|  | 2310   const std::string default_value( | 
|  | 2311       prefs->GetString(prefs::kSSLVersionFallbackMin)); | 
|  | 2312 | 
|  | 2313   EXPECT_NE(default_value, new_value); | 
|  | 2314   EXPECT_FALSE(IsMinSSLFallbackVersionTLS12(browser()->profile())); | 
|  | 2315 | 
|  | 2316   PolicyMap policies; | 
|  | 2317   policies.Set(key::kSSLVersionFallbackMin, | 
|  | 2318                POLICY_LEVEL_MANDATORY, | 
|  | 2319                POLICY_SCOPE_USER, | 
|  | 2320                new base::StringValue(new_value), | 
|  | 2321                NULL); | 
|  | 2322   UpdateProviderPolicy(policies); | 
|  | 2323 | 
|  | 2324   EXPECT_TRUE(IsMinSSLFallbackVersionTLS12(browser()->profile())); | 
|  | 2325 } | 
|  | 2326 | 
| 2298 #if !defined(OS_MACOSX) | 2327 #if !defined(OS_MACOSX) | 
| 2299 IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) { | 2328 IN_PROC_BROWSER_TEST_F(PolicyTest, FullscreenAllowedBrowser) { | 
| 2300   PolicyMap policies; | 2329   PolicyMap policies; | 
| 2301   policies.Set(key::kFullscreenAllowed, | 2330   policies.Set(key::kFullscreenAllowed, | 
| 2302                POLICY_LEVEL_MANDATORY, | 2331                POLICY_LEVEL_MANDATORY, | 
| 2303                POLICY_SCOPE_USER, | 2332                POLICY_SCOPE_USER, | 
| 2304                new base::FundamentalValue(false), | 2333                new base::FundamentalValue(false), | 
| 2305                NULL); | 2334                NULL); | 
| 2306   UpdateProviderPolicy(policies); | 2335   UpdateProviderPolicy(policies); | 
| 2307 | 2336 | 
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3321   EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 3350   EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 
| 3322       browser2->tab_strip_model()->GetActiveWebContents(), | 3351       browser2->tab_strip_model()->GetActiveWebContents(), | 
| 3323       "domAutomationController.send(window.showModalDialog !== undefined);", | 3352       "domAutomationController.send(window.showModalDialog !== undefined);", | 
| 3324       &result)); | 3353       &result)); | 
| 3325   EXPECT_TRUE(result); | 3354   EXPECT_TRUE(result); | 
| 3326 } | 3355 } | 
| 3327 | 3356 | 
| 3328 #endif  // !defined(CHROME_OS) | 3357 #endif  // !defined(CHROME_OS) | 
| 3329 | 3358 | 
| 3330 }  // namespace policy | 3359 }  // namespace policy | 
| OLD | NEW | 
|---|