OLD | NEW |
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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/chromeos/login/login_manager_test.h" | 9 #include "chrome/browser/chromeos/login/login_manager_test.h" |
10 #include "chrome/browser/chromeos/login/startup_utils.h" | 10 #include "chrome/browser/chromeos/login/startup_utils.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 virtual void SetUpOnMainThread() OVERRIDE { | 82 virtual void SetUpOnMainThread() OVERRIDE { |
83 host_ = LoginDisplayHostImpl::default_host(); | 83 host_ = LoginDisplayHostImpl::default_host(); |
84 CHECK(host_); | 84 CHECK(host_); |
85 content::WebContents* web_contents = | 85 content::WebContents* web_contents = |
86 LoginDisplayHostImpl::default_host()->GetWebUILoginView()-> | 86 LoginDisplayHostImpl::default_host()->GetWebUILoginView()-> |
87 GetWebContents(); | 87 GetWebContents(); |
88 captive_portal_window_proxy_.reset( | 88 captive_portal_window_proxy_.reset( |
89 new CaptivePortalWindowProxy(&delegate_, web_contents)); | 89 new CaptivePortalWindowProxy(&delegate_, web_contents)); |
90 } | 90 } |
91 | 91 |
92 virtual void CleanUpOnMainThread() OVERRIDE { | 92 virtual void TearDownOnMainThread() OVERRIDE { |
93 captive_portal_window_proxy_.reset(); | 93 captive_portal_window_proxy_.reset(); |
94 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); | 94 base::MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); |
95 base::MessageLoopForUI::current()->RunUntilIdle(); | 95 base::MessageLoopForUI::current()->RunUntilIdle(); |
96 } | 96 } |
97 | 97 |
98 private: | 98 private: |
99 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_; | 99 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_; |
100 CaptivePortalWindowProxyStubDelegate delegate_; | 100 CaptivePortalWindowProxyStubDelegate delegate_; |
101 | 101 |
102 LoginDisplayHost* host_; | 102 LoginDisplayHost* host_; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); | 228 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_LOGIN_SCREEN, strategy_id()); |
229 network_portal_detector()->NotifyObserversForTesting(); | 229 network_portal_detector()->NotifyObserversForTesting(); |
230 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); | 230 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); |
231 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); | 231 ASSERT_EQ(PortalDetectorStrategy::STRATEGY_ID_ERROR_SCREEN, strategy_id()); |
232 | 232 |
233 actor->ShowCaptivePortal(); | 233 actor->ShowCaptivePortal(); |
234 } | 234 } |
235 | 235 |
236 } // namespace chromeos | 236 } // namespace chromeos |
OLD | NEW |