| 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 1883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1894 gfx::Rect hide_target_bounds = status_window->GetTargetBounds(); | 1894 gfx::Rect hide_target_bounds = status_window->GetTargetBounds(); |
| 1895 EXPECT_GT(hide_target_bounds.y(), initial_bounds.y()); | 1895 EXPECT_GT(hide_target_bounds.y(), initial_bounds.y()); |
| 1896 | 1896 |
| 1897 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); | 1897 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
| 1898 gfx::Rect reshow_target_bounds = status_window->GetTargetBounds(); | 1898 gfx::Rect reshow_target_bounds = status_window->GetTargetBounds(); |
| 1899 EXPECT_EQ(initial_bounds, reshow_target_bounds); | 1899 EXPECT_EQ(initial_bounds, reshow_target_bounds); |
| 1900 } | 1900 } |
| 1901 | 1901 |
| 1902 // Tests that during shutdown, that window activation changes are properly | 1902 // Tests that during shutdown, that window activation changes are properly |
| 1903 // handled, and do not crash (crbug.com/458768) | 1903 // handled, and do not crash (crbug.com/458768) |
| 1904 TEST_F(ShelfLayoutManagerTest, ShutdownHandlesWindowActivation) { | 1904 TEST_F(ShelfLayoutManagerTest, DISABLED_ShutdownHandlesWindowActivation) { |
| 1905 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); | 1905 GetShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
| 1906 | 1906 |
| 1907 aura::Window* window1 = CreateTestWindowInShellWithId(0); | 1907 aura::Window* window1 = CreateTestWindowInShellWithId(0); |
| 1908 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1908 window1->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 1909 window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); | 1909 window1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); |
| 1910 window1->Show(); | 1910 window1->Show(); |
| 1911 std::unique_ptr<aura::Window> window2(CreateTestWindowInShellWithId(0)); | 1911 std::unique_ptr<aura::Window> window2(CreateTestWindowInShellWithId(0)); |
| 1912 window2->SetBounds(gfx::Rect(0, 0, 100, 100)); | 1912 window2->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 1913 window2->Show(); | 1913 window2->Show(); |
| 1914 wm::ActivateWindow(window1); | 1914 wm::ActivateWindow(window1); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1930 | 1930 |
| 1931 StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget(); | 1931 StatusAreaWidget* status_area_widget = GetShelfWidget()->status_area_widget(); |
| 1932 EXPECT_TRUE(status_area_widget->IsVisible()); | 1932 EXPECT_TRUE(status_area_widget->IsVisible()); |
| 1933 // Shelf should be in the first display's area. | 1933 // Shelf should be in the first display's area. |
| 1934 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); | 1934 gfx::Rect status_area_bounds(status_area_widget->GetWindowBoundsInScreen()); |
| 1935 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); | 1935 EXPECT_TRUE(gfx::Rect(0, 0, 500, 400).Contains(status_area_bounds)); |
| 1936 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); | 1936 EXPECT_EQ(gfx::Point(500, 400), status_area_bounds.bottom_right()); |
| 1937 } | 1937 } |
| 1938 | 1938 |
| 1939 } // namespace ash | 1939 } // namespace ash |
| OLD | NEW |