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 "chrome/browser/ui/ash/screenshot_taker.h" | 5 #include "chrome/browser/ui/ash/screenshot_taker.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 screenshot_taker.HandleTakePartialScreenshot( | 112 screenshot_taker.HandleTakePartialScreenshot( |
113 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100)); | 113 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100)); |
114 | 114 |
115 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot()); | 115 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot()); |
116 | 116 |
117 Wait(); | 117 Wait(); |
118 | 118 |
119 #if defined(OS_CHROMEOS) | 119 #if defined(OS_CHROMEOS) |
120 // Screenshot notifications on Windows not yet turned on. | 120 // Screenshot notifications on Windows not yet turned on. |
121 EXPECT_TRUE(g_browser_process->notification_ui_manager()->DoesIdExist( | 121 EXPECT_TRUE(g_browser_process->notification_ui_manager()->FindById( |
122 std::string("screenshot"))); | 122 std::string("screenshot")) != NULL); |
123 g_browser_process->notification_ui_manager()->CancelAll(); | 123 g_browser_process->notification_ui_manager()->CancelAll(); |
124 #endif | 124 #endif |
125 | 125 |
126 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); | 126 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); |
127 | 127 |
128 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) | 128 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) |
129 EXPECT_TRUE(base::PathExists(screenshot_path_)); | 129 EXPECT_TRUE(base::PathExists(screenshot_path_)); |
130 } | 130 } |
131 | 131 |
132 } // namespace test | 132 } // namespace test |
133 } // namespace ash | 133 } // namespace ash |
OLD | NEW |