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

Side by Side Diff: ash/wm/system_modal_container_layout_manager_unittest.cc

Issue 11117012: ash: Fix event processing in modal windows in login/lock screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ash/wm/system_modal_container_layout_manager.h" 5 #include "ash/wm/system_modal_container_layout_manager.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 bool AllRootWindowsHaveModalBackgrounds() { 34 bool AllRootWindowsHaveModalBackgrounds() {
35 Shell::RootWindowControllerList controllers = 35 Shell::RootWindowControllerList controllers =
36 Shell::GetAllRootWindowControllers(); 36 Shell::GetAllRootWindowControllers();
37 bool has_modal_screen = !controllers.empty(); 37 bool has_modal_screen = !controllers.empty();
38 for (Shell::RootWindowControllerList::const_iterator iter = 38 for (Shell::RootWindowControllerList::const_iterator iter =
39 controllers.begin(); 39 controllers.begin();
40 iter != controllers.end(); ++iter) { 40 iter != controllers.end(); ++iter) {
41 has_modal_screen &= 41 has_modal_screen &=
42 (*iter)->GetSystemModalLayoutManager()->has_modal_background(); 42 (*iter)->GetSystemModalLayoutManager(NULL)->has_modal_background();
43 } 43 }
44 return has_modal_screen; 44 return has_modal_screen;
45 } 45 }
46 46
47 class TestWindow : public views::WidgetDelegateView { 47 class TestWindow : public views::WidgetDelegateView {
48 public: 48 public:
49 explicit TestWindow(bool modal) : modal_(modal) {} 49 explicit TestWindow(bool modal) : modal_(modal) {}
50 virtual ~TestWindow() {} 50 virtual ~TestWindow() {}
51 51
52 static aura::Window* OpenTestWindow(aura::Window* parent, bool modal) { 52 static aura::Window* OpenTestWindow(aura::Window* parent, bool modal) {
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 EXPECT_TRUE(wm::IsActiveWindow(modal1.get())); 404 EXPECT_TRUE(wm::IsActiveWindow(modal1.get()));
405 405
406 // No more modal screen. 406 // No more modal screen.
407 modal1.reset(); 407 modal1.reset();
408 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds()); 408 EXPECT_FALSE(AllRootWindowsHaveModalBackgrounds());
409 EXPECT_TRUE(wm::IsActiveWindow(normal.get())); 409 EXPECT_TRUE(wm::IsActiveWindow(normal.get()));
410 } 410 }
411 411
412 } // namespace test 412 } // namespace test
413 } // namespace ash 413 } // namespace ash
OLDNEW
« ash/root_window_controller.cc ('K') | « ash/wm/shelf_layout_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698