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

Side by Side Diff: chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc

Issue 1870793002: Convert //chrome/browser/chromeos 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <memory>
6
5 #include "base/command_line.h" 7 #include "base/command_line.h"
6 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/chromeos/login/login_manager_test.h" 11 #include "chrome/browser/chromeos/login/login_manager_test.h"
11 #include "chrome/browser/chromeos/login/screens/error_screen.h" 12 #include "chrome/browser/chromeos/login/screens/error_screen.h"
12 #include "chrome/browser/chromeos/login/screens/network_error_view.h" 13 #include "chrome/browser/chromeos/login/screens/network_error_view.h"
13 #include "chrome/browser/chromeos/login/startup_utils.h" 14 #include "chrome/browser/chromeos/login/startup_utils.h"
14 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" 15 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
15 #include "chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h" 16 #include "chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h"
16 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 17 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
17 #include "chrome/browser/chromeos/login/ui/webui_login_view.h" 18 #include "chrome/browser/chromeos/login/ui/webui_login_view.h"
18 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h" 19 #include "chrome/browser/chromeos/net/network_portal_detector_test_impl.h"
19 #include "chrome/test/base/in_process_browser_test.h" 20 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 new CaptivePortalWindowProxy(&delegate_, web_contents)); 88 new CaptivePortalWindowProxy(&delegate_, web_contents));
88 } 89 }
89 90
90 void TearDownOnMainThread() override { 91 void TearDownOnMainThread() override {
91 captive_portal_window_proxy_.reset(); 92 captive_portal_window_proxy_.reset();
92 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); 93 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_);
93 base::MessageLoopForUI::current()->RunUntilIdle(); 94 base::MessageLoopForUI::current()->RunUntilIdle();
94 } 95 }
95 96
96 private: 97 private:
97 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_; 98 std::unique_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_;
98 CaptivePortalWindowProxyStubDelegate delegate_; 99 CaptivePortalWindowProxyStubDelegate delegate_;
99 100
100 LoginDisplayHost* host_; 101 LoginDisplayHost* host_;
101 }; 102 };
102 103
103 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, Show) { 104 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, Show) {
104 Show(); 105 Show();
105 } 106 }
106 107
107 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, ShowClose) { 108 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, ShowClose) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 224
224 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); 225 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id());
225 network_portal_detector()->NotifyObserversForTesting(); 226 network_portal_detector()->NotifyObserversForTesting();
226 OobeScreenWaiter(OobeScreen::SCREEN_ERROR_MESSAGE).Wait(); 227 OobeScreenWaiter(OobeScreen::SCREEN_ERROR_MESSAGE).Wait();
227 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); 228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id());
228 229
229 error_screen->ShowCaptivePortal(); 230 error_screen->ShowCaptivePortal();
230 } 231 }
231 232
232 } // namespace chromeos 233 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/test/oobe_base_test.h ('k') | chrome/browser/chromeos/login/ui/captive_portal_window_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698