Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: chrome/browser/ui/ash/chrome_screenshot_grabber_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_screenshot_grabber.cc ('k') | chrome/browser/ui/ash/chrome_shell_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698