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

Side by Side Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2491033006: Adjust positioning of cros tray bubbles. (Closed)
Patch Set: rebase Created 4 years, 1 month 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 (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/common/shelf/shelf_layout_manager.h" 5 #include "ash/common/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/aura/wm_shelf_aura.h" 7 #include "ash/aura/wm_shelf_aura.h"
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/accelerators/accelerator_controller.h" 9 #include "ash/common/accelerators/accelerator_controller.h"
10 #include "ash/common/accelerators/accelerator_table.h" 10 #include "ash/common/accelerators/accelerator_table.h"
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 1741
1742 // Changing back to maximized dims again. 1742 // Changing back to maximized dims again.
1743 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 1743 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
1744 EXPECT_TRUE(shelf_widget->GetDimsShelf()); 1744 EXPECT_TRUE(shelf_widget->GetDimsShelf());
1745 1745
1746 // Changing shelf to autohide stops dimming. 1746 // Changing shelf to autohide stops dimming.
1747 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); 1747 shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
1748 EXPECT_FALSE(shelf_widget->GetDimsShelf()); 1748 EXPECT_FALSE(shelf_widget->GetDimsShelf());
1749 } 1749 }
1750 1750
1751 // This test fails on Windows (likely due to hard-coded pointer coordinate
1752 // arithmetic), but the Windows ash shell isn't supported any more so it's
1753 // probably not worth fixing. Also note that this test uses system tray
1754 // notification bubbles, which needn't exist: see crbug.com/630641
1755 #if defined(OS_WIN)
1756 #define MAYBE_BubbleEnlargesShelfMouseHitArea \
1757 DISABLED_BubbleEnlargesShelfMouseHitArea
1758 #else
1759 #define MAYBE_BubbleEnlargesShelfMouseHitArea BubbleEnlargesShelfMouseHitArea
1760 #endif
1751 // Make sure that the shelf will not hide if the mouse is between a bubble and 1761 // Make sure that the shelf will not hide if the mouse is between a bubble and
1752 // the shelf. 1762 // the shelf.
1753 TEST_F(ShelfLayoutManagerTest, BubbleEnlargesShelfMouseHitArea) { 1763 TEST_F(ShelfLayoutManagerTest, MAYBE_BubbleEnlargesShelfMouseHitArea) {
1754 WmShelf* shelf = GetPrimaryShelf(); 1764 WmShelf* shelf = GetPrimaryShelf();
1755 ShelfLayoutManager* layout_manager = GetShelfLayoutManager(); 1765 ShelfLayoutManager* layout_manager = GetShelfLayoutManager();
1756 StatusAreaWidget* status_area_widget = 1766 StatusAreaWidget* status_area_widget =
1757 shelf->shelf_widget()->status_area_widget(); 1767 shelf->shelf_widget()->status_area_widget();
1758 SystemTray* tray = GetPrimarySystemTray(); 1768 SystemTray* tray = GetPrimarySystemTray();
1759 1769
1760 // Create a visible window so auto-hide behavior is enforced. 1770 // Create a visible window so auto-hide behavior is enforced.
1761 CreateTestWidget(); 1771 CreateTestWidget();
1762 1772
1763 layout_manager->LayoutShelf(); 1773 layout_manager->LayoutShelf();
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2050 // Open keyboard in sticky mode. 2060 // Open keyboard in sticky mode.
2051 kb_controller->ShowKeyboard(true); 2061 kb_controller->ShowKeyboard(true);
2052 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); 2062 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds());
2053 2063
2054 // Work area should be changed. 2064 // Work area should be changed.
2055 EXPECT_NE(orig_work_area, 2065 EXPECT_NE(orig_work_area,
2056 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); 2066 display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
2057 } 2067 }
2058 2068
2059 } // namespace ash 2069 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/web_notification/web_notification_tray.cc ('k') | ui/message_center/views/message_bubble_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698