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

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl_unittest.cc

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 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
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "ui/aura/client/screen_position_client.h" 7 #include "ui/aura/client/screen_position_client.h"
8 #include "ui/aura/test/test_cursor_client.h" 8 #include "ui/aura/test/test_cursor_client.h"
9 #include "ui/aura/window.h" 9 #include "ui/aura/window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 ui::EventTarget* root = GetContext(); 726 ui::EventTarget* root = GetContext();
727 ui::EventTargeter* targeter = root->GetEventTargeter(); 727 ui::EventTargeter* targeter = root->GetEventTargeter();
728 728
729 // Create the first window containing a Views::Textfield. 729 // Create the first window containing a Views::Textfield.
730 CreateTextfield(); 730 CreateTextfield();
731 aura::Window* window1 = textfield_widget_->GetNativeView(); 731 aura::Window* window1 = textfield_widget_->GetNativeView();
732 732
733 // Start touch editing, check that the handle is above the first window, and 733 // Start touch editing, check that the handle is above the first window, and
734 // end touch editing. 734 // end touch editing.
735 StartTouchEditing(); 735 StartTouchEditing();
736 auto test_point = gfx::PointF(GetCursorHandleDragPoint()); 736 gfx::Point test_point = GetCursorHandleDragPoint();
737 ui::MouseEvent test_event1(ui::ET_MOUSE_MOVED, test_point, test_point, 737 ui::MouseEvent test_event1(ui::ET_MOUSE_MOVED, test_point, test_point,
738 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE); 738 ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
739 EXPECT_EQ(GetCursorHandleNativeView(), 739 EXPECT_EQ(GetCursorHandleNativeView(),
740 targeter->FindTargetForEvent(root, &test_event1)); 740 targeter->FindTargetForEvent(root, &test_event1));
741 EndTouchEditing(); 741 EndTouchEditing();
742 742
743 // Create the second (empty) window over the first one. 743 // Create the second (empty) window over the first one.
744 CreateWidget(); 744 CreateWidget();
745 aura::Window* window2 = widget_->GetNativeView(); 745 aura::Window* window2 = widget_->GetNativeView();
746 746
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 // Start touch editing; then press a key and ensure it deactivates touch 832 // Start touch editing; then press a key and ensure it deactivates touch
833 // selection. 833 // selection.
834 StartTouchEditing(); 834 StartTouchEditing();
835 EXPECT_TRUE(GetSelectionController()); 835 EXPECT_TRUE(GetSelectionController());
836 generator.PressKey(ui::VKEY_A, 0); 836 generator.PressKey(ui::VKEY_A, 0);
837 RunPendingMessages(); 837 RunPendingMessages();
838 EXPECT_FALSE(GetSelectionController()); 838 EXPECT_FALSE(GetSelectionController());
839 } 839 }
840 840
841 } // namespace views 841 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/window_manager_connection.cc ('k') | ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698