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

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

Issue 63343004: Remove DialogDelegate::UseNewStyle and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore [D]CHECKs and loop scoping. Created 7 years, 1 month 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 | Annotate | Revision Log
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 "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/captive_portal_window_proxy.h" 9 #include "chrome/browser/chromeos/login/captive_portal_window_proxy.h"
10 #include "chrome/browser/chromeos/login/login_display_host_impl.h" 10 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ASSERT_EQ(num_portal_notifications, delegate_.num_portal_notifications()); 68 ASSERT_EQ(num_portal_notifications, delegate_.num_portal_notifications());
69 } 69 }
70 70
71 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 71 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
72 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 72 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
73 command_line->AppendSwitch(chromeos::switches::kLoginManager); 73 command_line->AppendSwitch(chromeos::switches::kLoginManager);
74 } 74 }
75 75
76 virtual void SetUpOnMainThread() OVERRIDE { 76 virtual void SetUpOnMainThread() OVERRIDE {
77 CHECK(LoginDisplayHostImpl::default_host()); 77 CHECK(LoginDisplayHostImpl::default_host());
78 gfx::NativeWindow native_window =
79 LoginDisplayHostImpl::default_host()->GetNativeWindow();
80 content::WebContents* web_contents = 78 content::WebContents* web_contents =
81 LoginDisplayHostImpl::default_host()->GetWebUILoginView()-> 79 LoginDisplayHostImpl::default_host()->GetWebUILoginView()->
82 GetWebContents(); 80 GetWebContents();
83 captive_portal_window_proxy_.reset( 81 captive_portal_window_proxy_.reset(
84 new CaptivePortalWindowProxy(&delegate_, native_window, web_contents)); 82 new CaptivePortalWindowProxy(&delegate_, web_contents));
85 } 83 }
86 84
87 private: 85 private:
88 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_; 86 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_;
89 CaptivePortalWindowProxyStubDelegate delegate_; 87 CaptivePortalWindowProxyStubDelegate delegate_;
90 }; 88 };
91 89
92 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, ShowClose) { 90 IN_PROC_BROWSER_TEST_F(CaptivePortalWindowTest, ShowClose) {
93 CheckState(false, 0); 91 CheckState(false, 0);
94 92
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 CheckState(true, 2); 148 CheckState(true, 2);
151 149
152 Close(); 150 Close();
153 CheckState(false, 2); 151 CheckState(false, 2);
154 152
155 OnOriginalURLLoaded(); 153 OnOriginalURLLoaded();
156 CheckState(false, 2); 154 CheckState(false, 2);
157 } 155 }
158 156
159 } // namespace chromeos 157 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/captive_portal_view.cc ('k') | chrome/browser/chromeos/login/captive_portal_window_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698