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

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

Issue 413433002: Refactor BubbleDelegateView::use_focuseless() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cros compilation Created 6 years, 5 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 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 "ash/wm/immersive_fullscreen_controller.h" 5 #include "ash/wm/immersive_fullscreen_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/mouse_cursor_event_filter.h" 8 #include "ash/display/mouse_cursor_event_filter.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/shelf/shelf_layout_manager.h" 10 #include "ash/shelf/shelf_layout_manager.h"
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 top_container_widget->Activate(); 961 top_container_widget->Activate();
962 EXPECT_TRUE(controller()->IsRevealed()); 962 EXPECT_TRUE(controller()->IsRevealed());
963 963
964 // 3) Test that the top-of-window views stay revealed as long as at least one 964 // 3) Test that the top-of-window views stay revealed as long as at least one
965 // bubble anchored to a child of the top container is visible. 965 // bubble anchored to a child of the top container is visible.
966 SetHovered(false); 966 SetHovered(false);
967 EXPECT_FALSE(controller()->IsRevealed()); 967 EXPECT_FALSE(controller()->IsRevealed());
968 968
969 views::BubbleDelegateView* bubble_delegate4(new views::BubbleDelegateView( 969 views::BubbleDelegateView* bubble_delegate4(new views::BubbleDelegateView(
970 child_view, views::BubbleBorder::NONE)); 970 child_view, views::BubbleBorder::NONE));
971 bubble_delegate4->set_use_focusless(true); 971 bubble_delegate4->set_can_activate(false);
972 views::Widget* bubble_widget4(views::BubbleDelegateView::CreateBubble( 972 views::Widget* bubble_widget4(views::BubbleDelegateView::CreateBubble(
973 bubble_delegate4)); 973 bubble_delegate4));
974 bubble_widget4->Show(); 974 bubble_widget4->Show();
975 975
976 views::BubbleDelegateView* bubble_delegate5(new views::BubbleDelegateView( 976 views::BubbleDelegateView* bubble_delegate5(new views::BubbleDelegateView(
977 child_view, views::BubbleBorder::NONE)); 977 child_view, views::BubbleBorder::NONE));
978 bubble_delegate5->set_use_focusless(true); 978 bubble_delegate5->set_can_activate(false);
979 views::Widget* bubble_widget5(views::BubbleDelegateView::CreateBubble( 979 views::Widget* bubble_widget5(views::BubbleDelegateView::CreateBubble(
980 bubble_delegate5)); 980 bubble_delegate5));
981 bubble_widget5->Show(); 981 bubble_widget5->Show();
982 982
983 EXPECT_TRUE(controller()->IsRevealed()); 983 EXPECT_TRUE(controller()->IsRevealed());
984 bubble_widget4->Hide(); 984 bubble_widget4->Hide();
985 EXPECT_TRUE(controller()->IsRevealed()); 985 EXPECT_TRUE(controller()->IsRevealed());
986 bubble_widget5->Hide(); 986 bubble_widget5->Hide();
987 EXPECT_FALSE(controller()->IsRevealed()); 987 EXPECT_FALSE(controller()->IsRevealed());
988 bubble_widget5->Show(); 988 bubble_widget5->Show();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1068 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1069 1069
1070 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1070 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1071 SetEnabled(false); 1071 SetEnabled(false);
1072 window()->SetProperty(aura::client::kShowStateKey, 1072 window()->SetProperty(aura::client::kShowStateKey,
1073 ui::SHOW_STATE_NORMAL); 1073 ui::SHOW_STATE_NORMAL);
1074 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1074 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1075 } 1075 }
1076 1076
1077 } // namespase ash 1077 } // namespase ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698