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

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

Issue 2369293002: Set status tray height to 37px on login screen (Closed)
Patch Set: Created 4 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
« no previous file with comments | « ash/common/system/web_notification/web_notification_tray.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget(); 1884 StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget();
1885 ui::test::EventGenerator& generator(GetEventGenerator()); 1885 ui::test::EventGenerator& generator(GetEventGenerator());
1886 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); 1886 display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay();
1887 gfx::Rect inset_display_bounds = display.bounds(); 1887 gfx::Rect inset_display_bounds = display.bounds();
1888 inset_display_bounds.Inset(0, 0, 1, 1); 1888 inset_display_bounds.Inset(0, 0, 1, 1);
1889 1889
1890 // Test bottom right pixel for bottom alignment. 1890 // Test bottom right pixel for bottom alignment.
1891 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_BOTTOM); 1891 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_BOTTOM);
1892 generator.MoveMouseTo(inset_display_bounds.bottom_right()); 1892 generator.MoveMouseTo(inset_display_bounds.bottom_right());
1893 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1893 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1894 #if !defined(OS_WIN)
Mr4D (OOO till 08-26) 2016/09/29 08:24:52 Did you test this on (MS) Windows? Are you sure th
yoshiki 2016/09/29 08:29:40 I didn't test it locally but tested on trybot. Thi
1895 generator.ClickLeftButton(); 1894 generator.ClickLeftButton();
1896 // The bottom right pixel doesn't work on Windows; see crbug.com/633434
1897 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); 1895 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
1898 #endif
1899 generator.ClickLeftButton(); 1896 generator.ClickLeftButton();
1900 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1897 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1901 1898
1902 // Test bottom right pixel for right alignment. 1899 // Test bottom right pixel for right alignment.
1903 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_RIGHT); 1900 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_RIGHT);
1904 generator.MoveMouseTo(inset_display_bounds.bottom_right()); 1901 generator.MoveMouseTo(inset_display_bounds.bottom_right());
1905 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1902 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1906 #if !defined(OS_WIN)
1907 generator.ClickLeftButton(); 1903 generator.ClickLeftButton();
1908 // The bottom right pixel doesn't work on Windows; see crbug.com/633434
1909 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); 1904 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
1910 #endif
1911 generator.ClickLeftButton(); 1905 generator.ClickLeftButton();
1912 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1906 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1913 1907
1914 // Test bottom left pixel for left alignment. 1908 // Test bottom left pixel for left alignment.
1915 generator.MoveMouseTo(inset_display_bounds.bottom_left()); 1909 generator.MoveMouseTo(inset_display_bounds.bottom_left());
1916 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); 1910 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT);
1917 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); 1911 EXPECT_FALSE(status_area_widget->IsMessageBubbleShown());
1918 generator.ClickLeftButton(); 1912 generator.ClickLeftButton();
1919 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); 1913 EXPECT_TRUE(status_area_widget->IsMessageBubbleShown());
1920 generator.ClickLeftButton(); 1914 generator.ClickLeftButton();
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
2084 // Open keyboard in sticky mode. 2078 // Open keyboard in sticky mode.
2085 kb_controller->ShowKeyboard(true); 2079 kb_controller->ShowKeyboard(true);
2086 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); 2080 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds());
2087 2081
2088 // Work area should be changed. 2082 // Work area should be changed.
2089 EXPECT_NE(orig_work_area, 2083 EXPECT_NE(orig_work_area,
2090 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); 2084 display::Screen::GetScreen()->GetPrimaryDisplay().work_area());
2091 } 2085 }
2092 2086
2093 } // namespace ash 2087 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/web_notification/web_notification_tray.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698