| OLD | NEW |
| 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/shelf/shelf_layout_manager.h" | 5 #include "ash/shelf/shelf_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/accelerators/accelerator_controller.h" | 8 #include "ash/common/accelerators/accelerator_controller.h" |
| 9 #include "ash/common/accelerators/accelerator_table.h" | 9 #include "ash/common/accelerators/accelerator_table.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1895 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); | 1895 ui::ScopedAnimationDurationScaleMode::SLOW_DURATION); |
| 1896 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); | 1896 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
| 1897 gfx::Rect hide_target_bounds = status_window->GetTargetBounds(); | 1897 gfx::Rect hide_target_bounds = status_window->GetTargetBounds(); |
| 1898 EXPECT_GT(hide_target_bounds.y(), initial_bounds.y()); | 1898 EXPECT_GT(hide_target_bounds.y(), initial_bounds.y()); |
| 1899 | 1899 |
| 1900 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | 1900 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
| 1901 gfx::Rect reshow_target_bounds = status_window->GetTargetBounds(); | 1901 gfx::Rect reshow_target_bounds = status_window->GetTargetBounds(); |
| 1902 EXPECT_EQ(initial_bounds, reshow_target_bounds); | 1902 EXPECT_EQ(initial_bounds, reshow_target_bounds); |
| 1903 } | 1903 } |
| 1904 | 1904 |
| 1905 // Flaky crash on Windows (crbug.com/637873). |
| 1906 #if defined(OS_WIN) |
| 1907 #define MAYBE_ShutdownHandlesWindowActivation \ |
| 1908 DISABLED_ShutdownHandlesWindowActivation |
| 1909 #else |
| 1910 #define MAYBE_ShutdownHandlesWindowActivation ShutdownHandlesWindowActivation |
| 1911 #endif |
| 1912 |
| 1905 // Tests that during shutdown, that window activation changes are properly | 1913 // Tests that during shutdown, that window activation changes are properly |
| 1906 // handled, and do not crash (crbug.com/458768) | 1914 // handled, and do not crash (crbug.com/458768) |
| 1907 TEST_F(ShelfLayoutManagerTest, DISABLED_ShutdownHandlesWindowActivation) { | 1915 TEST_F(ShelfLayoutManagerTest, MAYBE_ShutdownHandlesWindowActivation) { |
| 1908 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 1916 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
| 1909 | 1917 |
| 1910 aura::Window* window1 = CreateTestWindowInShellWithId(0); | 1918 aura::Window* window1 = CreateTestWindowInShellWithId(0); |
| 1911 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1919 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 1912 window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 1920 window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
| 1913 window1->Show(); | 1921 window1->Show(); |
| 1914 std::unique_ptr<aura::Window> window2(CreateTestWindowInShellWithId(0)); | 1922 std::unique_ptr<aura::Window> window2(CreateTestWindowInShellWithId(0)); |
| 1915 window2->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1923 window2->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 1916 window2->Show(); | 1924 window2->Show(); |
| 1917 wm::ActivateWindow(window1); | 1925 wm::ActivateWindow(window1); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 // Open keyboard in sticky mode. | 2047 // Open keyboard in sticky mode. |
| 2040 kb_controller->ShowKeyboard(true); | 2048 kb_controller->ShowKeyboard(true); |
| 2041 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); | 2049 layout_manager->OnKeyboardBoundsChanging(keyboard_bounds()); |
| 2042 | 2050 |
| 2043 // Work area should be changed. | 2051 // Work area should be changed. |
| 2044 EXPECT_NE(orig_work_area, | 2052 EXPECT_NE(orig_work_area, |
| 2045 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); | 2053 display::Screen::GetScreen()->GetPrimaryDisplay().work_area()); |
| 2046 } | 2054 } |
| 2047 | 2055 |
| 2048 } // namespace ash | 2056 } // namespace ash |
| OLD | NEW |