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

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

Issue 2248913005: Revert of Use MD-ash's auto hide behavior for arc++ windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_NE(ash::wm::WindowState::SHELF_HIDDEN, 206 EXPECT_FALSE(window_state->hide_shelf_when_fullscreen());
207 window_state->shelf_mode_in_fullscreen());
208 EXPECT_FALSE(tester->IsLocked()); 207 EXPECT_FALSE(tester->IsLocked());
209 } 208 }
210 { 209 {
211 Waiter waiter(browser()); 210 Waiter waiter(browser());
212 ScreenLocker::Show(); 211 ScreenLocker::Show();
213 tester->EmulateWindowManagerReady(); 212 tester->EmulateWindowManagerReady();
214 waiter.Wait(true /* locked */, true /* full screen */); 213 waiter.Wait(true /* locked */, true /* full screen */);
215 EXPECT_TRUE(browser_window->IsFullscreen()); 214 EXPECT_TRUE(browser_window->IsFullscreen());
216 EXPECT_NE(ash::wm::WindowState::SHELF_HIDDEN, 215 EXPECT_FALSE(window_state->hide_shelf_when_fullscreen());
217 window_state->shelf_mode_in_fullscreen());
218 EXPECT_TRUE(tester->IsLocked()); 216 EXPECT_TRUE(tester->IsLocked());
219 } 217 }
220 UserContext user_context(login::StubAccountId()); 218 UserContext user_context(login::StubAccountId());
221 user_context.SetKey(Key("pass")); 219 user_context.SetKey(Key("pass"));
222 tester->InjectStubUserContext(user_context); 220 tester->InjectStubUserContext(user_context);
223 tester->EnterPassword("pass"); 221 tester->EnterPassword("pass");
224 content::RunAllPendingInMessageLoop(); 222 content::RunAllPendingInMessageLoop();
225 EXPECT_FALSE(tester->IsLocked()); 223 EXPECT_FALSE(tester->IsLocked());
226 { 224 {
227 Waiter waiter(browser()); 225 Waiter waiter(browser());
(...skipping 11 matching lines...) Expand all
239 { 237 {
240 Waiter waiter(browser()); 238 Waiter waiter(browser());
241 content::WebContents* web_contents = 239 content::WebContents* web_contents =
242 browser()->tab_strip_model()->GetActiveWebContents(); 240 browser()->tab_strip_model()->GetActiveWebContents();
243 browser() 241 browser()
244 ->exclusive_access_manager() 242 ->exclusive_access_manager()
245 ->fullscreen_controller() 243 ->fullscreen_controller()
246 ->EnterFullscreenModeForTab(web_contents, GURL()); 244 ->EnterFullscreenModeForTab(web_contents, GURL());
247 waiter.Wait(false /* not locked */, true /* fullscreen */); 245 waiter.Wait(false /* not locked */, true /* fullscreen */);
248 EXPECT_TRUE(browser_window->IsFullscreen()); 246 EXPECT_TRUE(browser_window->IsFullscreen());
249 EXPECT_EQ(ash::wm::WindowState::SHELF_HIDDEN, 247 EXPECT_TRUE(window_state->hide_shelf_when_fullscreen());
250 window_state->shelf_mode_in_fullscreen());
251 EXPECT_FALSE(tester->IsLocked()); 248 EXPECT_FALSE(tester->IsLocked());
252 } 249 }
253 { 250 {
254 Waiter waiter(browser()); 251 Waiter waiter(browser());
255 ScreenLocker::Show(); 252 ScreenLocker::Show();
256 tester->EmulateWindowManagerReady(); 253 tester->EmulateWindowManagerReady();
257 waiter.Wait(true /* locked */, false /* full screen */); 254 waiter.Wait(true /* locked */, false /* full screen */);
258 EXPECT_FALSE(browser_window->IsFullscreen()); 255 EXPECT_FALSE(browser_window->IsFullscreen());
259 EXPECT_TRUE(tester->IsLocked()); 256 EXPECT_TRUE(tester->IsLocked());
260 } 257 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 EXPECT_EQ("", tester->GetPassword()); 314 EXPECT_EQ("", tester->GetPassword());
318 315
319 // Close the locker to match expectations. 316 // Close the locker to match expectations.
320 ScreenLocker::Hide(); 317 ScreenLocker::Hide();
321 content::RunAllPendingInMessageLoop(); 318 content::RunAllPendingInMessageLoop();
322 EXPECT_FALSE(tester->IsLocked()); 319 EXPECT_FALSE(tester->IsLocked());
323 EXPECT_TRUE(VerifyLockScreenDismissed()); 320 EXPECT_TRUE(VerifyLockScreenDismissed());
324 } 321 }
325 322
326 } // namespace chromeos 323 } // 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