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

Unified Diff: ui/views/widget/widget_interactive_uitest.cc

Issue 700563002: Implementing directional text selection handles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_assets_text
Patch Set: Removing the SelectionBound test from Android, since touch_editing_controller not included in Andro… Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget_interactive_uitest.cc
diff --git a/ui/views/widget/widget_interactive_uitest.cc b/ui/views/widget/widget_interactive_uitest.cc
index c37236e427ce7cb05f14b3bcf70e49b984a93b64..ff00ed156793d60d6f5ee0c385617149c588cdc2 100644
--- a/ui/views/widget/widget_interactive_uitest.cc
+++ b/ui/views/widget/widget_interactive_uitest.cc
@@ -24,6 +24,7 @@
#include "ui/views/touchui/touch_selection_controller_impl.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_delegate.h"
+#include "ui/wm/core/default_screen_position_client.h"
#include "ui/wm/public/activation_client.h"
#if defined(OS_WIN)
@@ -764,6 +765,7 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
views_delegate().set_use_desktop_native_widgets(true);
#endif // !defined(OS_WIN)
+ wm::DefaultScreenPositionClient screen_position_client;
Widget widget;
Widget::InitParams init_params =
CreateParams(Widget::InitParams::TYPE_WINDOW_FRAMELESS);
@@ -780,6 +782,10 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
textfield->RequestFocus();
textfield->SelectAll(true);
TextfieldTestApi textfield_test_api(textfield);
+#if defined(USE_AURA)
+ aura::client::SetScreenPositionClient(widget.GetNativeView()->GetRootWindow(),
+ &screen_position_client);
+#endif // !defined(USE_AURA)
RunPendingMessages();
@@ -792,6 +798,8 @@ TEST_F(WidgetTestInteractive, TouchSelectionQuickMenuIsNotActivated) {
EXPECT_TRUE(widget.IsActive());
EXPECT_TRUE(IsQuickMenuVisible(static_cast<TouchSelectionControllerImpl*>(
textfield_test_api.touch_selection_controller())));
+ aura::client::SetScreenPositionClient(widget.GetNativeView()->GetRootWindow(),
+ nullptr);
}
TEST_F(WidgetTestInteractive, DisableViewDoesNotActivateWidget) {
« no previous file with comments | « ui/views/touchui/touch_selection_controller_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698