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

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

Issue 23449033: [ash] Remove Launcher::GetLauncherViewForTest() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing class keyword Created 7 years, 3 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/launcher/launcher_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | 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/shelf/shelf_layout_manager.h" 5 #include "ash/shelf/shelf_layout_manager.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
11 #include "ash/display/display_manager.h" 11 #include "ash/display/display_manager.h"
12 #include "ash/focus_cycler.h" 12 #include "ash/focus_cycler.h"
13 #include "ash/launcher/launcher.h" 13 #include "ash/launcher/launcher.h"
14 #include "ash/launcher/launcher_view.h" 14 #include "ash/launcher/launcher_view.h"
15 #include "ash/root_window_controller.h" 15 #include "ash/root_window_controller.h"
16 #include "ash/screen_ash.h" 16 #include "ash/screen_ash.h"
17 #include "ash/session_state_delegate.h" 17 #include "ash/session_state_delegate.h"
18 #include "ash/shelf/shelf_layout_manager_observer.h" 18 #include "ash/shelf/shelf_layout_manager_observer.h"
19 #include "ash/shelf/shelf_widget.h" 19 #include "ash/shelf/shelf_widget.h"
20 #include "ash/shell.h" 20 #include "ash/shell.h"
21 #include "ash/shell_window_ids.h" 21 #include "ash/shell_window_ids.h"
22 #include "ash/system/status_area_widget.h" 22 #include "ash/system/status_area_widget.h"
23 #include "ash/system/tray/system_tray.h" 23 #include "ash/system/tray/system_tray.h"
24 #include "ash/system/tray/system_tray_item.h" 24 #include "ash/system/tray/system_tray_item.h"
25 #include "ash/test/ash_test_base.h" 25 #include "ash/test/ash_test_base.h"
26 #include "ash/test/launcher_test_api.h"
26 #include "ash/wm/window_properties.h" 27 #include "ash/wm/window_properties.h"
27 #include "ash/wm/window_util.h" 28 #include "ash/wm/window_util.h"
28 #include "base/command_line.h" 29 #include "base/command_line.h"
29 #include "base/strings/utf_string_conversions.h" 30 #include "base/strings/utf_string_conversions.h"
30 #include "ui/aura/client/aura_constants.h" 31 #include "ui/aura/client/aura_constants.h"
31 #include "ui/aura/root_window.h" 32 #include "ui/aura/root_window.h"
32 #include "ui/aura/test/event_generator.h" 33 #include "ui/aura/test/event_generator.h"
33 #include "ui/aura/window.h" 34 #include "ui/aura/window.h"
34 #include "ui/base/animation/animation_container_element.h" 35 #include "ui/base/animation/animation_container_element.h"
35 #include "ui/compositor/layer.h" 36 #include "ui/compositor/layer.h"
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 // Makes sure the launcher is sized when the status area changes size. 778 // Makes sure the launcher is sized when the status area changes size.
778 TEST_F(ShelfLayoutManagerTest, LauncherUpdatedWhenStatusAreaChangesSize) { 779 TEST_F(ShelfLayoutManagerTest, LauncherUpdatedWhenStatusAreaChangesSize) {
779 Launcher* launcher = Launcher::ForPrimaryDisplay(); 780 Launcher* launcher = Launcher::ForPrimaryDisplay();
780 ASSERT_TRUE(launcher); 781 ASSERT_TRUE(launcher);
781 ShelfWidget* shelf_widget = GetShelfWidget(); 782 ShelfWidget* shelf_widget = GetShelfWidget();
782 ASSERT_TRUE(shelf_widget); 783 ASSERT_TRUE(shelf_widget);
783 ASSERT_TRUE(shelf_widget->status_area_widget()); 784 ASSERT_TRUE(shelf_widget->status_area_widget());
784 shelf_widget->status_area_widget()->SetBounds( 785 shelf_widget->status_area_widget()->SetBounds(
785 gfx::Rect(0, 0, 200, 200)); 786 gfx::Rect(0, 0, 200, 200));
786 EXPECT_EQ(200, shelf_widget->GetContentsView()->width() - 787 EXPECT_EQ(200, shelf_widget->GetContentsView()->width() -
787 launcher->GetLauncherViewForTest()->width()); 788 test::LauncherTestAPI(launcher).launcher_view()->width());
788 } 789 }
789 790
790 791
791 #if defined(OS_WIN) 792 #if defined(OS_WIN)
792 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962 793 // RootWindow and Display can't resize on Windows Ash. http://crbug.com/165962
793 #define MAYBE_AutoHide DISABLED_AutoHide 794 #define MAYBE_AutoHide DISABLED_AutoHide
794 #else 795 #else
795 #define MAYBE_AutoHide AutoHide 796 #define MAYBE_AutoHide AutoHide
796 #endif 797 #endif
797 798
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 scoped_ptr<aura::Window> w1(CreateTestWindow()); 1831 scoped_ptr<aura::Window> w1(CreateTestWindow());
1831 w1->Show(); 1832 w1->Show();
1832 wm::ActivateWindow(w1.get()); 1833 wm::ActivateWindow(w1.get());
1833 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); 1834 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
1834 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 1835 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
1835 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType()); 1836 EXPECT_EQ(SHELF_BACKGROUND_OVERLAP, GetShelfWidget()->GetBackgroundType());
1836 } 1837 }
1837 1838
1838 } // namespace internal 1839 } // namespace internal
1839 } // namespace ash 1840 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_view_unittest.cc ('k') | ash/shelf/shelf_widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698