| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "apps/launcher.h" | 5 #include "apps/launcher.h" |
| 6 #include "apps/shell_window.h" | 6 #include "apps/shell_window.h" |
| 7 #include "apps/shell_window_registry.h" | 7 #include "apps/shell_window_registry.h" |
| 8 #include "apps/ui/native_app_window.h" | 8 #include "apps/ui/native_app_window.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 : power_manager_client_(NULL), | 1235 : power_manager_client_(NULL), |
| 1236 mock_user_manager_(NULL) {} | 1236 mock_user_manager_(NULL) {} |
| 1237 virtual ~RestartDeviceTest() {} | 1237 virtual ~RestartDeviceTest() {} |
| 1238 | 1238 |
| 1239 // PlatformAppBrowserTest overrides | 1239 // PlatformAppBrowserTest overrides |
| 1240 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 1240 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 1241 PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture(); | 1241 PlatformAppBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 1242 | 1242 |
| 1243 chromeos::FakeDBusThreadManager* dbus_manager = | 1243 chromeos::FakeDBusThreadManager* dbus_manager = |
| 1244 new chromeos::FakeDBusThreadManager; | 1244 new chromeos::FakeDBusThreadManager; |
| 1245 power_manager_client_ = new chromeos::FakePowerManagerClient; |
| 1246 dbus_manager->SetPowerManagerClient( |
| 1247 scoped_ptr<chromeos::PowerManagerClient>(power_manager_client_)); |
| 1245 chromeos::DBusThreadManager::InitializeForTesting(dbus_manager); | 1248 chromeos::DBusThreadManager::InitializeForTesting(dbus_manager); |
| 1246 power_manager_client_ = dbus_manager->fake_power_manager_client(); | |
| 1247 } | 1249 } |
| 1248 | 1250 |
| 1249 virtual void SetUpOnMainThread() OVERRIDE { | 1251 virtual void SetUpOnMainThread() OVERRIDE { |
| 1250 PlatformAppBrowserTest::SetUpOnMainThread(); | 1252 PlatformAppBrowserTest::SetUpOnMainThread(); |
| 1251 | 1253 |
| 1252 mock_user_manager_ = new chromeos::MockUserManager; | 1254 mock_user_manager_ = new chromeos::MockUserManager; |
| 1253 user_manager_enabler_.reset( | 1255 user_manager_enabler_.reset( |
| 1254 new chromeos::ScopedUserManagerEnabler(mock_user_manager_)); | 1256 new chromeos::ScopedUserManagerEnabler(mock_user_manager_)); |
| 1255 | 1257 |
| 1256 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) | 1258 EXPECT_CALL(*mock_user_manager_, IsUserLoggedIn()) |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 false); | 1298 false); |
| 1297 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); | 1299 ASSERT_TRUE(restart_requested_listener.WaitUntilSatisfied()); |
| 1298 | 1300 |
| 1299 EXPECT_EQ(1, request_restart_call_count()); | 1301 EXPECT_EQ(1, request_restart_call_count()); |
| 1300 } | 1302 } |
| 1301 | 1303 |
| 1302 #endif // defined(OS_CHROMEOS) | 1304 #endif // defined(OS_CHROMEOS) |
| 1303 | 1305 |
| 1304 | 1306 |
| 1305 } // namespace extensions | 1307 } // namespace extensions |
| OLD | NEW |