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

Side by Side Diff: chrome/browser/chromeos/login/lock/screen_locker_browsertest.cc

Issue 2248773002: Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash/shell.h bac to merge to m53 Created 4 years, 4 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 "chrome/browser/chromeos/login/lock/screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/wm/window_state_aura.h" 10 #include "ash/wm/window_state_aura.h"
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 ash::wm::WindowState* window_state = ash::wm::GetWindowState( 196 ash::wm::WindowState* window_state = ash::wm::GetWindowState(
197 browser_window->GetNativeWindow()); 197 browser_window->GetNativeWindow());
198 { 198 {
199 Waiter waiter(browser()); 199 Waiter waiter(browser());
200 browser() 200 browser()
201 ->exclusive_access_manager() 201 ->exclusive_access_manager()
202 ->fullscreen_controller() 202 ->fullscreen_controller()
203 ->ToggleBrowserFullscreenMode(); 203 ->ToggleBrowserFullscreenMode();
204 waiter.Wait(false /* not locked */, true /* full screen */); 204 waiter.Wait(false /* not locked */, true /* full screen */);
205 EXPECT_TRUE(browser_window->IsFullscreen()); 205 EXPECT_TRUE(browser_window->IsFullscreen());
206 EXPECT_FALSE(window_state->hide_shelf_when_fullscreen()); 206 EXPECT_NE(ash::wm::WindowState::SHELF_HIDDEN,
207 window_state->shelf_mode_in_fullscreen());
207 EXPECT_FALSE(tester->IsLocked()); 208 EXPECT_FALSE(tester->IsLocked());
208 } 209 }
209 { 210 {
210 Waiter waiter(browser()); 211 Waiter waiter(browser());
211 ScreenLocker::Show(); 212 ScreenLocker::Show();
212 tester->EmulateWindowManagerReady(); 213 tester->EmulateWindowManagerReady();
213 waiter.Wait(true /* locked */, true /* full screen */); 214 waiter.Wait(true /* locked */, true /* full screen */);
214 EXPECT_TRUE(browser_window->IsFullscreen()); 215 EXPECT_TRUE(browser_window->IsFullscreen());
215 EXPECT_FALSE(window_state->hide_shelf_when_fullscreen()); 216 EXPECT_NE(ash::wm::WindowState::SHELF_HIDDEN,
217 window_state->shelf_mode_in_fullscreen());
216 EXPECT_TRUE(tester->IsLocked()); 218 EXPECT_TRUE(tester->IsLocked());
217 } 219 }
218 UserContext user_context(login::StubAccountId()); 220 UserContext user_context(login::StubAccountId());
219 user_context.SetKey(Key("pass")); 221 user_context.SetKey(Key("pass"));
220 tester->InjectStubUserContext(user_context); 222 tester->InjectStubUserContext(user_context);
221 tester->EnterPassword("pass"); 223 tester->EnterPassword("pass");
222 content::RunAllPendingInMessageLoop(); 224 content::RunAllPendingInMessageLoop();
223 EXPECT_FALSE(tester->IsLocked()); 225 EXPECT_FALSE(tester->IsLocked());
224 { 226 {
225 Waiter waiter(browser()); 227 Waiter waiter(browser());
(...skipping 11 matching lines...) Expand all
237 { 239 {
238 Waiter waiter(browser()); 240 Waiter waiter(browser());
239 content::WebContents* web_contents = 241 content::WebContents* web_contents =
240 browser()->tab_strip_model()->GetActiveWebContents(); 242 browser()->tab_strip_model()->GetActiveWebContents();
241 browser() 243 browser()
242 ->exclusive_access_manager() 244 ->exclusive_access_manager()
243 ->fullscreen_controller() 245 ->fullscreen_controller()
244 ->EnterFullscreenModeForTab(web_contents, GURL()); 246 ->EnterFullscreenModeForTab(web_contents, GURL());
245 waiter.Wait(false /* not locked */, true /* fullscreen */); 247 waiter.Wait(false /* not locked */, true /* fullscreen */);
246 EXPECT_TRUE(browser_window->IsFullscreen()); 248 EXPECT_TRUE(browser_window->IsFullscreen());
247 EXPECT_TRUE(window_state->hide_shelf_when_fullscreen()); 249 EXPECT_EQ(ash::wm::WindowState::SHELF_HIDDEN,
250 window_state->shelf_mode_in_fullscreen());
248 EXPECT_FALSE(tester->IsLocked()); 251 EXPECT_FALSE(tester->IsLocked());
249 } 252 }
250 { 253 {
251 Waiter waiter(browser()); 254 Waiter waiter(browser());
252 ScreenLocker::Show(); 255 ScreenLocker::Show();
253 tester->EmulateWindowManagerReady(); 256 tester->EmulateWindowManagerReady();
254 waiter.Wait(true /* locked */, false /* full screen */); 257 waiter.Wait(true /* locked */, false /* full screen */);
255 EXPECT_FALSE(browser_window->IsFullscreen()); 258 EXPECT_FALSE(browser_window->IsFullscreen());
256 EXPECT_TRUE(tester->IsLocked()); 259 EXPECT_TRUE(tester->IsLocked());
257 } 260 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 EXPECT_EQ("", tester->GetPassword()); 317 EXPECT_EQ("", tester->GetPassword());
315 318
316 // Close the locker to match expectations. 319 // Close the locker to match expectations.
317 ScreenLocker::Hide(); 320 ScreenLocker::Hide();
318 content::RunAllPendingInMessageLoop(); 321 content::RunAllPendingInMessageLoop();
319 EXPECT_FALSE(tester->IsLocked()); 322 EXPECT_FALSE(tester->IsLocked());
320 EXPECT_TRUE(VerifyLockScreenDismissed()); 323 EXPECT_TRUE(VerifyLockScreenDismissed());
321 } 324 }
322 325
323 } // namespace chromeos 326 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.cc ('k') | chrome/browser/notifications/fullscreen_notification_blocker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698