| 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 "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" | 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
| 11 #include "chrome/browser/chromeos/dbus/mock_dbus_thread_manager.h" | |
| 12 #include "chrome/browser/chromeos/dbus/mock_power_manager_client.h" | |
| 13 #include "chrome/browser/chromeos/login/mock_user_manager.h" | 11 #include "chrome/browser/chromeos/login/mock_user_manager.h" |
| 14 #include "chrome/common/chrome_notification_types.h" | 12 #include "chrome/common/chrome_notification_types.h" |
| 15 #include "chrome/common/extensions/extension.h" | 13 #include "chrome/common/extensions/extension.h" |
| 14 #include "chromeos/dbus/mock_dbus_thread_manager.h" |
| 15 #include "chromeos/dbus/mock_power_manager_client.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/notification_registrar.h" | 17 #include "content/public/browser/notification_registrar.h" |
| 18 #include "content/public/browser/notification_service.h" | 18 #include "content/public/browser/notification_service.h" |
| 19 #include "content/test/test_browser_thread.h" | 19 #include "content/test/test_browser_thread.h" |
| 20 #include "testing/gmock/include/gmock/gmock.h" | 20 #include "testing/gmock/include/gmock/gmock.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 | 22 |
| 23 using content::BrowserThread; | 23 using content::BrowserThread; |
| 24 using ::testing::_; | 24 using ::testing::_; |
| 25 using ::testing::AnyNumber; | 25 using ::testing::AnyNumber; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 TEST_F(KioskModeScreensaverTest, CheckObserversAfterUserLogin) { | 107 TEST_F(KioskModeScreensaverTest, CheckObserversAfterUserLogin) { |
| 108 content::NotificationService::current()->Notify( | 108 content::NotificationService::current()->Notify( |
| 109 chrome::NOTIFICATION_SESSION_STARTED, | 109 chrome::NOTIFICATION_SESSION_STARTED, |
| 110 content::Source<UserManager>(UserManager::Get()), | 110 content::Source<UserManager>(UserManager::Get()), |
| 111 content::NotificationService::NoDetails()); | 111 content::NotificationService::NoDetails()); |
| 112 | 112 |
| 113 EXPECT_FALSE(PowerManagerObserverRegistered()); | 113 EXPECT_FALSE(PowerManagerObserverRegistered()); |
| 114 } | 114 } |
| 115 | 115 |
| 116 } // namespace chromeos | 116 } // namespace chromeos |
| OLD | NEW |