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

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: nit + rebase 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 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 top_container_widget->Activate(); 960 top_container_widget->Activate();
961 EXPECT_TRUE(controller()->IsRevealed()); 961 EXPECT_TRUE(controller()->IsRevealed());
962 962
963 // 3) Test that the top-of-window views stay revealed as long as at least one 963 // 3) Test that the top-of-window views stay revealed as long as at least one
964 // bubble anchored to a child of the top container is visible. 964 // bubble anchored to a child of the top container is visible.
965 SetHovered(false); 965 SetHovered(false);
966 EXPECT_FALSE(controller()->IsRevealed()); 966 EXPECT_FALSE(controller()->IsRevealed());
967 967
968 views::BubbleDelegateView* bubble_delegate4(new views::BubbleDelegateView( 968 views::BubbleDelegateView* bubble_delegate4(new views::BubbleDelegateView(
969 child_view, views::BubbleBorder::NONE)); 969 child_view, views::BubbleBorder::NONE));
970 bubble_delegate4->set_use_focusless(true); 970 bubble_delegate4->set_can_activate(false);
971 views::Widget* bubble_widget4(views::BubbleDelegateView::CreateBubble( 971 views::Widget* bubble_widget4(views::BubbleDelegateView::CreateBubble(
972 bubble_delegate4)); 972 bubble_delegate4));
973 bubble_widget4->Show(); 973 bubble_widget4->Show();
974 974
975 views::BubbleDelegateView* bubble_delegate5(new views::BubbleDelegateView( 975 views::BubbleDelegateView* bubble_delegate5(new views::BubbleDelegateView(
976 child_view, views::BubbleBorder::NONE)); 976 child_view, views::BubbleBorder::NONE));
977 bubble_delegate5->set_use_focusless(true); 977 bubble_delegate5->set_can_activate(false);
978 views::Widget* bubble_widget5(views::BubbleDelegateView::CreateBubble( 978 views::Widget* bubble_widget5(views::BubbleDelegateView::CreateBubble(
979 bubble_delegate5)); 979 bubble_delegate5));
980 bubble_widget5->Show(); 980 bubble_widget5->Show();
981 981
982 EXPECT_TRUE(controller()->IsRevealed()); 982 EXPECT_TRUE(controller()->IsRevealed());
983 bubble_widget4->Hide(); 983 bubble_widget4->Hide();
984 EXPECT_TRUE(controller()->IsRevealed()); 984 EXPECT_TRUE(controller()->IsRevealed());
985 bubble_widget5->Hide(); 985 bubble_widget5->Hide();
986 EXPECT_FALSE(controller()->IsRevealed()); 986 EXPECT_FALSE(controller()->IsRevealed());
987 bubble_widget5->Show(); 987 bubble_widget5->Show();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1067 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1068 1068
1069 // Disabling immersive fullscreen maintains the user's auto-hide selection. 1069 // Disabling immersive fullscreen maintains the user's auto-hide selection.
1070 SetEnabled(false); 1070 SetEnabled(false);
1071 window()->SetProperty(aura::client::kShowStateKey, 1071 window()->SetProperty(aura::client::kShowStateKey,
1072 ui::SHOW_STATE_NORMAL); 1072 ui::SHOW_STATE_NORMAL);
1073 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state()); 1073 EXPECT_EQ(ash::SHELF_AUTO_HIDE, shelf->visibility_state());
1074 } 1074 }
1075 1075
1076 } // namespase ash 1076 } // namespase ash
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.cc ('k') | chrome/browser/ui/views/autofill/info_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698