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

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

Issue 2715513006: Fix showing the sibling menu on mouse move (Closed)
Patch Set: Fix compile error 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
« no previous file with comments | « ash/display/screen_ash.cc ('k') | ash/mus/screen_mus.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/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/common/drag_drop/drag_image_view.h" 7 #include "ash/common/drag_drop/drag_image_view.h"
8 #include "ash/drag_drop/drag_drop_tracker.h" 8 #include "ash/drag_drop/drag_drop_tracker.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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 generator.MoveMouseBy(0, 1); 776 generator.MoveMouseBy(0, 1);
777 777
778 // Execute any scheduled draws to process deferred mouse events. 778 // Execute any scheduled draws to process deferred mouse events.
779 RunAllPendingInMessageLoop(); 779 RunAllPendingInMessageLoop();
780 } 780 }
781 // Make sure the capture window won't handle mouse events. 781 // Make sure the capture window won't handle mouse events.
782 aura::Window* capture_window = drag_drop_tracker()->capture_window(); 782 aura::Window* capture_window = drag_drop_tracker()->capture_window();
783 ASSERT_TRUE(capture_window); 783 ASSERT_TRUE(capture_window);
784 EXPECT_EQ("0x0", capture_window->bounds().size().ToString()); 784 EXPECT_EQ("0x0", capture_window->bounds().size().ToString());
785 EXPECT_EQ(NULL, capture_window->GetEventHandlerForPoint(gfx::Point())); 785 EXPECT_EQ(NULL, capture_window->GetEventHandlerForPoint(gfx::Point()));
786 EXPECT_EQ(NULL, capture_window->GetTopWindowContainingPoint(gfx::Point()));
787 786
788 aura::client::GetCaptureClient(widget->GetNativeView()->GetRootWindow()) 787 aura::client::GetCaptureClient(widget->GetNativeView()->GetRootWindow())
789 ->SetCapture(NULL); 788 ->SetCapture(NULL);
790 789
791 EXPECT_TRUE(drag_drop_controller_->drag_start_received_); 790 EXPECT_TRUE(drag_drop_controller_->drag_start_received_);
792 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), 791 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
793 drag_drop_controller_->num_drag_updates_); 792 drag_drop_controller_->num_drag_updates_);
794 EXPECT_FALSE(drag_drop_controller_->drop_received_); 793 EXPECT_FALSE(drag_drop_controller_->drop_received_);
795 EXPECT_TRUE(drag_drop_controller_->drag_canceled_); 794 EXPECT_TRUE(drag_drop_controller_->drag_canceled_);
796 EXPECT_EQ(base::UTF8ToUTF16("I am being dragged"), 795 EXPECT_EQ(base::UTF8ToUTF16("I am being dragged"),
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 drag_drop_controller_->drag_string_); 1099 drag_drop_controller_->drag_string_);
1101 EXPECT_EQ(1, drag_view->num_drag_enters_); 1100 EXPECT_EQ(1, drag_view->num_drag_enters_);
1102 EXPECT_EQ(2, drag_view->num_drag_updates_); 1101 EXPECT_EQ(2, drag_view->num_drag_updates_);
1103 EXPECT_EQ(1, drag_view->num_drops_); 1102 EXPECT_EQ(1, drag_view->num_drops_);
1104 EXPECT_EQ(0, drag_view->num_drag_exits_); 1103 EXPECT_EQ(0, drag_view->num_drag_exits_);
1105 EXPECT_TRUE(drag_view->drag_done_received_); 1104 EXPECT_TRUE(drag_view->drag_done_received_);
1106 } 1105 }
1107 1106
1108 } // namespace test 1107 } // namespace test
1109 } // namespace ash 1108 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/screen_ash.cc ('k') | ash/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698