| 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 <memory> | 5 #include <memory> |
| 6 #include <utility> | 6 #include <utility> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 // Sets up a mock policy provider for user and device policies. | 1311 // Sets up a mock policy provider for user and device policies. |
| 1312 EXPECT_CALL(policy_provider_, IsInitializationComplete(testing::_)) | 1312 EXPECT_CALL(policy_provider_, IsInitializationComplete(testing::_)) |
| 1313 .WillRepeatedly(testing::Return(true)); | 1313 .WillRepeatedly(testing::Return(true)); |
| 1314 | 1314 |
| 1315 policy::PolicyMap policy_map; | 1315 policy::PolicyMap policy_map; |
| 1316 #if defined(OS_CHROMEOS) | 1316 #if defined(OS_CHROMEOS) |
| 1317 if (enroll_) | 1317 if (enroll_) |
| 1318 SetEnterpriseUsersDefaults(&policy_map); | 1318 SetEnterpriseUsersDefaults(&policy_map); |
| 1319 #endif | 1319 #endif |
| 1320 if (set_allow_dinosaur_easter_egg_) { | 1320 if (set_allow_dinosaur_easter_egg_) { |
| 1321 policy_map.Set( | 1321 policy_map.Set(policy::key::kAllowDinosaurEasterEgg, |
| 1322 policy::key::kAllowDinosaurEasterEgg, policy::POLICY_LEVEL_MANDATORY, | 1322 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
| 1323 policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, | 1323 policy::POLICY_SOURCE_CLOUD, |
| 1324 base::WrapUnique( | 1324 base::MakeUnique<base::FundamentalValue>( |
| 1325 new base::FundamentalValue(value_of_allow_dinosaur_easter_egg_)), | 1325 value_of_allow_dinosaur_easter_egg_), |
| 1326 nullptr); | 1326 nullptr); |
| 1327 } | 1327 } |
| 1328 policy_provider_.UpdateChromePolicy(policy_map); | 1328 policy_provider_.UpdateChromePolicy(policy_map); |
| 1329 | 1329 |
| 1330 #if defined(OS_CHROMEOS) | 1330 #if defined(OS_CHROMEOS) |
| 1331 policy::BrowserPolicyConnector::SetPolicyProviderForTesting( | 1331 policy::BrowserPolicyConnector::SetPolicyProviderForTesting( |
| 1332 &policy_provider_); | 1332 &policy_provider_); |
| 1333 #else | 1333 #else |
| 1334 policy::ProfilePolicyConnectorFactory::GetInstance() | 1334 policy::ProfilePolicyConnectorFactory::GetInstance() |
| 1335 ->PushProviderForTesting(&policy_provider_); | 1335 ->PushProviderForTesting(&policy_provider_); |
| 1336 #endif | 1336 #endif |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 Http09WeirdPortEnabled) { | 1533 Http09WeirdPortEnabled) { |
| 1534 const char kHttp09Response[] = "JumboShrimp"; | 1534 const char kHttp09Response[] = "JumboShrimp"; |
| 1535 ASSERT_TRUE(embedded_test_server()->Start()); | 1535 ASSERT_TRUE(embedded_test_server()->Start()); |
| 1536 ui_test_utils::NavigateToURL( | 1536 ui_test_utils::NavigateToURL( |
| 1537 browser(), embedded_test_server()->GetURL(std::string("/echo-raw?") + | 1537 browser(), embedded_test_server()->GetURL(std::string("/echo-raw?") + |
| 1538 kHttp09Response)); | 1538 kHttp09Response)); |
| 1539 EXPECT_TRUE(IsDisplayingText(browser(), kHttp09Response)); | 1539 EXPECT_TRUE(IsDisplayingText(browser(), kHttp09Response)); |
| 1540 } | 1540 } |
| 1541 | 1541 |
| 1542 } // namespace | 1542 } // namespace |
| OLD | NEW |