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

Side by Side Diff: ash/wm/panels/panel_layout_manager_unittest.cc

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
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/wm/panels/panel_layout_manager.h" 5 #include "ash/common/wm/panels/panel_layout_manager.h"
6 6
7 #include "ash/common/shelf/shelf_button.h" 7 #include "ash/common/shelf/shelf_button.h"
8 #include "ash/common/shelf/shelf_layout_manager.h" 8 #include "ash/common/shelf/shelf_layout_manager.h"
9 #include "ash/common/shelf/shelf_model.h" 9 #include "ash/common/shelf/shelf_model.h"
10 #include "ash/common/shelf/shelf_view.h" 10 #include "ash/common/shelf/shelf_view.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 test::ShelfViewTestAPI* shelf_view_test() { return shelf_view_test_.get(); } 215 test::ShelfViewTestAPI* shelf_view_test() { return shelf_view_test_.get(); }
216 216
217 // Clicks the shelf items on |shelf_view| that is associated with given 217 // Clicks the shelf items on |shelf_view| that is associated with given
218 // |window|. 218 // |window|.
219 void ClickShelfItemForWindow(ShelfView* shelf_view, aura::Window* window) { 219 void ClickShelfItemForWindow(ShelfView* shelf_view, aura::Window* window) {
220 test::ShelfViewTestAPI test_api(shelf_view); 220 test::ShelfViewTestAPI test_api(shelf_view);
221 test_api.SetAnimationDuration(1); 221 test_api.SetAnimationDuration(1);
222 test_api.RunMessageLoopUntilAnimationsDone(); 222 test_api.RunMessageLoopUntilAnimationsDone();
223 int index = WmShell::Get()->shelf_model()->ItemIndexByID( 223 int index = Shell::Get()->shelf_model()->ItemIndexByID(
224 window->GetProperty(kShelfIDKey)); 224 window->GetProperty(kShelfIDKey));
225 gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen(); 225 gfx::Rect bounds = test_api.GetButton(index)->GetBoundsInScreen();
226 226
227 ui::test::EventGenerator& event_generator = GetEventGenerator(); 227 ui::test::EventGenerator& event_generator = GetEventGenerator();
228 event_generator.MoveMouseTo(bounds.CenterPoint()); 228 event_generator.MoveMouseTo(bounds.CenterPoint());
229 event_generator.ClickLeftButton(); 229 event_generator.ClickLeftButton();
230 230
231 test_api.RunMessageLoopUntilAnimationsDone(); 231 test_api.RunMessageLoopUntilAnimationsDone();
232 } 232 }
233 233
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
920 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5)); 920 touch.set_location(gfx::Point(bounds.x() - 1, bounds.y() + 5));
921 target = targeter->FindTargetForEvent(root, &touch); 921 target = targeter->FindTargetForEvent(root, &touch);
922 EXPECT_NE(w.get(), target); 922 EXPECT_NE(w.get(), target);
923 } 923 }
924 924
925 INSTANTIATE_TEST_CASE_P(LtrRtl, 925 INSTANTIATE_TEST_CASE_P(LtrRtl,
926 PanelLayoutManagerTextDirectionTest, 926 PanelLayoutManagerTextDirectionTest,
927 testing::Bool()); 927 testing::Bool());
928 928
929 } // namespace ash 929 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/lock_state_controller_unittest.cc ('k') | ash/wm/panels/panel_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698