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/chrome_screenshot_grabber.h" | 5 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_controller.h" | 7 #include "ash/accelerators/accelerator_controller.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 9 #include "ash/test/ash_test_base.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 | 84 |
85 ChromeScreenshotGrabber* chrome_screenshot_grabber() { | 85 ChromeScreenshotGrabber* chrome_screenshot_grabber() { |
86 return chrome_screenshot_grabber_.get(); | 86 return chrome_screenshot_grabber_.get(); |
87 } | 87 } |
88 | 88 |
89 ui::ScreenshotGrabber* screenshot_grabber() { | 89 ui::ScreenshotGrabber* screenshot_grabber() { |
90 return chrome_screenshot_grabber_->screenshot_grabber_.get(); | 90 return chrome_screenshot_grabber_->screenshot_grabber_.get(); |
91 } | 91 } |
92 | 92 |
93 scoped_ptr<TestingProfileManager> profile_manager_; | 93 std::unique_ptr<TestingProfileManager> profile_manager_; |
94 TestingProfile* profile_; | 94 TestingProfile* profile_; |
95 bool running_; | 95 bool running_; |
96 bool screenshot_complete_; | 96 bool screenshot_complete_; |
97 ScreenshotGrabberObserver::Result screenshot_result_; | 97 ScreenshotGrabberObserver::Result screenshot_result_; |
98 scoped_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber_; | 98 std::unique_ptr<ChromeScreenshotGrabber> chrome_screenshot_grabber_; |
99 base::FilePath screenshot_path_; | 99 base::FilePath screenshot_path_; |
100 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; | 100 scoped_refptr<content::MessageLoopRunner> message_loop_runner_; |
101 | 101 |
102 private: | 102 private: |
103 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotGrabberTest); | 103 DISALLOW_COPY_AND_ASSIGN(ChromeScreenshotGrabberTest); |
104 }; | 104 }; |
105 | 105 |
106 TEST_F(ChromeScreenshotGrabberTest, TakeScreenshot) { | 106 TEST_F(ChromeScreenshotGrabberTest, TakeScreenshot) { |
107 #if defined(OS_CHROMEOS) | 107 #if defined(OS_CHROMEOS) |
108 // Note that within the test framework the LoginState object will always | 108 // Note that within the test framework the LoginState object will always |
(...skipping 26 matching lines...) Expand all Loading... |
135 if (ScreenshotGrabberObserver::SCREENSHOT_SUCCESS == screenshot_result_) | 135 if (ScreenshotGrabberObserver::SCREENSHOT_SUCCESS == screenshot_result_) |
136 EXPECT_TRUE(base::PathExists(screenshot_path_)); | 136 EXPECT_TRUE(base::PathExists(screenshot_path_)); |
137 | 137 |
138 #if defined(OS_CHROMEOS) | 138 #if defined(OS_CHROMEOS) |
139 chromeos::LoginState::Shutdown(); | 139 chromeos::LoginState::Shutdown(); |
140 #endif | 140 #endif |
141 } | 141 } |
142 | 142 |
143 } // namespace test | 143 } // namespace test |
144 } // namespace ash | 144 } // namespace ash |
OLD | NEW |