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

Side by Side Diff: ash/wm/overview/window_selector_unittest.cc

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Sync and rebase Created 3 years, 11 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/test/test_shell_delegate.cc ('k') | ash/wm/window_cycle_controller_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <algorithm> 5 #include <algorithm>
6 #include <vector> 6 #include <vector>
7 7
8 #include "ash/aura/wm_window_aura.h" 8 #include "ash/aura/wm_window_aura.h"
9 #include "ash/common/accessibility_delegate.h" 9 #include "ash/common/accessibility_delegate.h"
10 #include "ash/common/accessibility_types.h" 10 #include "ash/common/accessibility_types.h"
(...skipping 18 matching lines...) Expand all
29 #include "ash/common/wm_shell.h" 29 #include "ash/common/wm_shell.h"
30 #include "ash/common/wm_window_property.h" 30 #include "ash/common/wm_window_property.h"
31 #include "ash/drag_drop/drag_drop_controller.h" 31 #include "ash/drag_drop/drag_drop_controller.h"
32 #include "ash/public/cpp/shell_window_ids.h" 32 #include "ash/public/cpp/shell_window_ids.h"
33 #include "ash/root_window_controller.h" 33 #include "ash/root_window_controller.h"
34 #include "ash/screen_util.h" 34 #include "ash/screen_util.h"
35 #include "ash/shell.h" 35 #include "ash/shell.h"
36 #include "ash/test/ash_test_base.h" 36 #include "ash/test/ash_test_base.h"
37 #include "ash/test/shelf_view_test_api.h" 37 #include "ash/test/shelf_view_test_api.h"
38 #include "ash/test/shell_test_api.h" 38 #include "ash/test/shell_test_api.h"
39 #include "ash/test/test_app_list_view_presenter_impl.h"
39 #include "ash/wm/window_state_aura.h" 40 #include "ash/wm/window_state_aura.h"
40 #include "ash/wm/window_util.h" 41 #include "ash/wm/window_util.h"
41 #include "base/command_line.h" 42 #include "base/command_line.h"
42 #include "base/compiler_specific.h" 43 #include "base/compiler_specific.h"
43 #include "base/memory/scoped_vector.h" 44 #include "base/memory/scoped_vector.h"
44 #include "base/run_loop.h" 45 #include "base/run_loop.h"
45 #include "base/strings/string_piece.h" 46 #include "base/strings/string_piece.h"
46 #include "base/strings/utf_string_conversions.h" 47 #include "base/strings/utf_string_conversions.h"
47 #include "base/test/user_action_tester.h" 48 #include "base/test/user_action_tester.h"
48 #include "base/threading/thread_task_runner_handle.h" 49 #include "base/threading/thread_task_runner_handle.h"
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 ClickWindow(window2.get()); 1201 ClickWindow(window2.get());
1201 EXPECT_EQ(normal_window_bounds.ToString(), 1202 EXPECT_EQ(normal_window_bounds.ToString(),
1202 window2->GetTargetBounds().ToString()); 1203 window2->GetTargetBounds().ToString());
1203 } 1204 }
1204 1205
1205 // Tests that beginning window selection hides the app list. 1206 // Tests that beginning window selection hides the app list.
1206 TEST_F(WindowSelectorTest, SelectingHidesAppList) { 1207 TEST_F(WindowSelectorTest, SelectingHidesAppList) {
1207 gfx::Rect bounds(0, 0, 400, 400); 1208 gfx::Rect bounds(0, 0, 400, 400);
1208 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); 1209 std::unique_ptr<aura::Window> window1(CreateWindow(bounds));
1209 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); 1210 std::unique_ptr<aura::Window> window2(CreateWindow(bounds));
1210 WmShell::Get()->ShowAppList(); 1211
1211 EXPECT_TRUE(WmShell::Get()->GetAppListTargetVisibility()); 1212 // The tested behavior relies on the app list presenter delegate.
1213 test::TestAppListViewPresenterImpl app_list_presenter_impl;
1214
1215 app_list_presenter_impl.Show(display_manager()->first_display_id());
1216 EXPECT_TRUE(app_list_presenter_impl.IsVisible());
1217
1212 ToggleOverview(); 1218 ToggleOverview();
1213 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility()); 1219 EXPECT_FALSE(app_list_presenter_impl.IsVisible());
1214 ToggleOverview(); 1220 ToggleOverview();
1215 } 1221 }
1216 1222
1217 // Tests that a minimized window's visibility and layer visibility is correctly 1223 // Tests that a minimized window's visibility and layer visibility is correctly
1218 // changed when entering overview and restored when leaving overview mode. 1224 // changed when entering overview and restored when leaving overview mode.
1219 // Crashes after the skia roll in http://crrev.com/274114. 1225 // Crashes after the skia roll in http://crrev.com/274114.
1220 // http://crbug.com/379570 1226 // http://crbug.com/379570
1221 TEST_F(WindowSelectorTest, DISABLED_MinimizedWindowVisibility) { 1227 TEST_F(WindowSelectorTest, DISABLED_MinimizedWindowVisibility) {
1222 gfx::Rect bounds(0, 0, 400, 400); 1228 gfx::Rect bounds(0, 0, 400, 400);
1223 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); 1229 std::unique_ptr<aura::Window> window1(CreateWindow(bounds));
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); 2128 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE));
2123 ASSERT_TRUE(resizer.get()); 2129 ASSERT_TRUE(resizer.get());
2124 gfx::Point location = resizer->GetInitialLocation(); 2130 gfx::Point location = resizer->GetInitialLocation();
2125 location.Offset(20, 20); 2131 location.Offset(20, 20);
2126 resizer->Drag(location, 0); 2132 resizer->Drag(location, 0);
2127 ToggleOverview(); 2133 ToggleOverview();
2128 resizer->RevertDrag(); 2134 resizer->RevertDrag();
2129 } 2135 }
2130 2136
2131 } // namespace ash 2137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_shell_delegate.cc ('k') | ash/wm/window_cycle_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698