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

Side by Side Diff: ash/drag_drop/drag_drop_controller_unittest.cc

Issue 126513004: Rename RootWindowHost to WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/display/virtual_keyboard_window_controller.cc ('k') | ash/host/root_window_host_factory.h » ('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/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/drag_drop/drag_drop_tracker.h" 7 #include "ash/drag_drop/drag_drop_tracker.h"
8 #include "ash/drag_drop/drag_image_view.h" 8 #include "ash/drag_drop/drag_image_view.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 if (i > 0) 730 if (i > 0)
731 UpdateDragData(&data); 731 UpdateDragData(&data);
732 generator.MoveMouseBy(0, 1); 732 generator.MoveMouseBy(0, 1);
733 733
734 // We send a unexpected mouse move event. Note that we cannot use 734 // We send a unexpected mouse move event. Note that we cannot use
735 // EventGenerator since it implicitly turns these into mouse drag events. 735 // EventGenerator since it implicitly turns these into mouse drag events.
736 // The DragDropController should simply ignore these events. 736 // The DragDropController should simply ignore these events.
737 gfx::Point mouse_move_location = drag_view->bounds().CenterPoint(); 737 gfx::Point mouse_move_location = drag_view->bounds().CenterPoint();
738 ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location, 738 ui::MouseEvent mouse_move(ui::ET_MOUSE_MOVED, mouse_move_location,
739 mouse_move_location, 0, 0); 739 mouse_move_location, 0, 0);
740 Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()-> 740 Shell::GetPrimaryRootWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
741 OnHostMouseEvent(&mouse_move); 741 OnHostMouseEvent(&mouse_move);
742 } 742 }
743 743
744 generator.ReleaseLeftButton(); 744 generator.ReleaseLeftButton();
745 745
746 EXPECT_TRUE(drag_drop_controller_->drag_start_received_); 746 EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
747 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), 747 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
748 drag_drop_controller_->num_drag_updates_); 748 drag_drop_controller_->num_drag_updates_);
749 EXPECT_TRUE(drag_drop_controller_->drop_received_); 749 EXPECT_TRUE(drag_drop_controller_->drop_received_);
750 EXPECT_EQ(base::UTF8ToUTF16("I am being dragged"), 750 EXPECT_EQ(base::UTF8ToUTF16("I am being dragged"),
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); 1078 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
1079 } 1079 }
1080 for (aura::Window::Windows::iterator iter = root_windows.begin(); 1080 for (aura::Window::Windows::iterator iter = root_windows.begin();
1081 iter != root_windows.end(); ++iter) { 1081 iter != root_windows.end(); ++iter) {
1082 aura::client::SetDragDropClient(*iter, NULL); 1082 aura::client::SetDragDropClient(*iter, NULL);
1083 } 1083 }
1084 } 1084 }
1085 1085
1086 } // namespace test 1086 } // namespace test
1087 } // namespace aura 1087 } // namespace aura
OLDNEW
« no previous file with comments | « ash/display/virtual_keyboard_window_controller.cc ('k') | ash/host/root_window_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698