Chromium Code Reviews| Index: chrome/browser/ui/ash/screenshot_taker_unittest.cc |
| diff --git a/chrome/browser/ui/ash/screenshot_taker_unittest.cc b/chrome/browser/ui/ash/screenshot_taker_unittest.cc |
| index a35339af4ccfcc8faca9782b3691c5233a461288..2dda1280e460f4f8b5f01403bba67a06bf7f52dd 100644 |
| --- a/chrome/browser/ui/ash/screenshot_taker_unittest.cc |
| +++ b/chrome/browser/ui/ash/screenshot_taker_unittest.cc |
| @@ -22,6 +22,10 @@ |
| #include "ui/aura/root_window.h" |
| #include "ui/message_center/message_center_switches.h" |
| +#if defined(OS_CHROMEOS) |
| +#include "chromeos/login/login_state.h" |
| +#endif |
| + |
| namespace ash { |
| namespace test { |
| @@ -94,6 +98,12 @@ class ScreenshotTakerTest : public AshTestBase, |
| }; |
| TEST_F(ScreenshotTakerTest, TakeScreenshot) { |
| +#if defined(OS_CHROMEOS) |
| + // Note that within the testframework the LoginState object will always claim |
|
James Cook
2013/08/09 20:09:16
testframework -> test framework
Mr4D (OOO till 08-26)
2013/08/09 20:35:45
Done.
|
| + // that the user did log in. |
| + ASSERT_FALSE(chromeos::LoginState::IsInitialized()); |
| + chromeos::LoginState::Initialize(); |
| +#endif |
| scoped_ptr<TestingProfileManager> profile_manager( |
| new TestingProfileManager(TestingBrowserProcess::GetGlobal())); |
| ASSERT_TRUE(profile_manager->SetUp()); |
| @@ -121,12 +131,17 @@ TEST_F(ScreenshotTakerTest, TakeScreenshot) { |
| EXPECT_TRUE(g_browser_process->notification_ui_manager()->FindById( |
| std::string("screenshot")) != NULL); |
| g_browser_process->notification_ui_manager()->CancelAll(); |
| + |
|
James Cook
2013/08/09 20:09:16
nit: maybe no blank line here?
Mr4D (OOO till 08-26)
2013/08/09 20:35:45
Done.
|
| #endif |
| EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); |
| if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) |
| EXPECT_TRUE(base::PathExists(screenshot_path_)); |
| + |
| +#if defined(OS_CHROMEOS) |
| + chromeos::LoginState::Shutdown(); |
| +#endif |
| } |
| } // namespace test |