| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 4172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4183 } | 4183 } |
| 4184 | 4184 |
| 4185 void SetUpInProcessBrowserTestFixture() override { | 4185 void SetUpInProcessBrowserTestFixture() override { |
| 4186 PolicyTest::SetUpInProcessBrowserTestFixture(); | 4186 PolicyTest::SetUpInProcessBrowserTestFixture(); |
| 4187 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient; | 4187 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient; |
| 4188 fake_session_manager_client_->set_arc_available(true); | 4188 fake_session_manager_client_->set_arc_available(true); |
| 4189 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( | 4189 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( |
| 4190 std::unique_ptr<chromeos::SessionManagerClient>( | 4190 std::unique_ptr<chromeos::SessionManagerClient>( |
| 4191 fake_session_manager_client_)); | 4191 fake_session_manager_client_)); |
| 4192 | 4192 |
| 4193 auto service = base::MakeUnique<arc::ArcBridgeServiceImpl>(); | 4193 // Inject FakeArcSession here so blocking task runner is not needed. |
| 4194 auto service = base::MakeUnique<arc::ArcBridgeServiceImpl>(nullptr); |
| 4194 service->SetArcSessionFactoryForTesting( | 4195 service->SetArcSessionFactoryForTesting( |
| 4195 base::Bind(arc::FakeArcSession::Create)); | 4196 base::Bind(arc::FakeArcSession::Create)); |
| 4196 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service)); | 4197 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service)); |
| 4197 } | 4198 } |
| 4198 | 4199 |
| 4199 void SetUpCommandLine(base::CommandLine* command_line) override { | 4200 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 4200 // ArcAuthService functionality is available only when Arc is enabled. Use | 4201 // ArcAuthService functionality is available only when Arc is enabled. Use |
| 4201 // kEnableArc switch that activates it. | 4202 // kEnableArc switch that activates it. |
| 4202 command_line->AppendSwitch(chromeos::switches::kEnableArc); | 4203 command_line->AppendSwitch(chromeos::switches::kEnableArc); |
| 4203 } | 4204 } |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4489 | 4490 |
| 4490 SetEmptyPolicy(); | 4491 SetEmptyPolicy(); |
| 4491 // Policy not set. | 4492 // Policy not set. |
| 4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4493 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4494 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4495 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4495 } | 4496 } |
| 4496 #endif // defined(OS_CHROMEOS) | 4497 #endif // defined(OS_CHROMEOS) |
| 4497 | 4498 |
| 4498 } // namespace policy | 4499 } // namespace policy |
| OLD | NEW |