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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100)); | 99 Shell::GetPrimaryRootWindow(), gfx::Rect(0, 0, 100, 100)); |
100 | 100 |
101 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot()); | 101 EXPECT_FALSE(screenshot_taker.CanTakeScreenshot()); |
102 | 102 |
103 Wait(); | 103 Wait(); |
104 | 104 |
105 #if defined(OS_CHROMEOS) | 105 #if defined(OS_CHROMEOS) |
106 // Screenshot notifications on Windows not yet turned on. | 106 // Screenshot notifications on Windows not yet turned on. |
107 EXPECT_TRUE(g_browser_process->notification_ui_manager()->DoesIdExist( | 107 EXPECT_TRUE(g_browser_process->notification_ui_manager()->DoesIdExist( |
108 std::string("screenshot_001"))); | 108 std::string("screenshot_001"))); |
| 109 g_browser_process->notification_ui_manager()->CancelAll(); |
109 #endif | 110 #endif |
110 | 111 |
111 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); | 112 EXPECT_EQ(ScreenshotTakerObserver::SCREENSHOT_SUCCESS, screenshot_result_); |
112 | 113 |
113 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) | 114 if (ScreenshotTakerObserver::SCREENSHOT_SUCCESS == screenshot_result_) |
114 EXPECT_TRUE(file_util::PathExists(screenshot_path_)); | 115 EXPECT_TRUE(file_util::PathExists(screenshot_path_)); |
115 } | 116 } |
116 | 117 |
117 } // namespace test | 118 } // namespace test |
118 } // namespace ash | 119 } // namespace ash |
OLD | NEW |