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

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

Issue 77203002: Revert 236048 "Rename RootWindowHost* to WindowTreeHost*" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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
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); 739 mouse_move_location, 0);
740 Shell::GetPrimaryRootWindow()->GetDispatcher()->AsWindowTreeHostDelegate()-> 740 Shell::GetPrimaryRootWindow()->GetDispatcher()->AsRootWindowHostDelegate()->
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(UTF8ToUTF16("I am being dragged"), 750 EXPECT_EQ(UTF8ToUTF16("I am being dragged"),
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString()); 1074 EXPECT_EQ("405,405", observer.window_location_on_destroying().ToString());
1075 } 1075 }
1076 for (aura::Window::Windows::iterator iter = root_windows.begin(); 1076 for (aura::Window::Windows::iterator iter = root_windows.begin();
1077 iter != root_windows.end(); ++iter) { 1077 iter != root_windows.end(); ++iter) {
1078 aura::client::SetDragDropClient(*iter, NULL); 1078 aura::client::SetDragDropClient(*iter, NULL);
1079 } 1079 }
1080 } 1080 }
1081 1081
1082 } // namespace test 1082 } // namespace test
1083 } // namespace aura 1083 } // namespace aura
OLDNEW
« no previous file with comments | « trunk/src/ash/display/virtual_keyboard_window_controller.cc ('k') | trunk/src/ash/host/root_window_host_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698