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

Unified Diff: ui/views/touchui/touch_selection_controller_impl_unittest.cc

Issue 2488393003: Changes views_aura_mus_unittests to create DesktopNativeWidgetAura (Closed)
Patch Set: remove this and fix mac Created 4 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/test/widget_test_mac.mm ('k') | ui/views/touchui/touch_selection_menu_runner_views_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/touchui/touch_selection_controller_impl_unittest.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index e3983dc045918d803a0be91e8af25841c5be4888..be377cdad22d0f7b9278af391951b00778d424fe 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -75,6 +75,10 @@ class TouchSelectionControllerImplTest : public ViewsTestBase {
void SetUp() override {
ViewsTestBase::SetUp();
+ // TODO: test uses GetContext(), which is not applicable to aura-mus.
+ // http://crbug.com/663809.
+ if (IsAuraMusClient())
+ return;
test_cursor_client_.reset(new aura::test::TestCursorClient(GetContext()));
}
@@ -318,6 +322,10 @@ class TouchSelectionControllerImplTest : public ViewsTestBase {
// Tests that the selection handles are placed appropriately when selection in
// a Textfield changes.
TEST_F(TouchSelectionControllerImplTest, SelectionInTextfieldTest) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("some text"));
// Tap the textfield to invoke touch selection.
@@ -351,6 +359,10 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInTextfieldTest) {
// Tests that the selection handles are placed appropriately in bidi text.
TEST_F(TouchSelectionControllerImplTest, SelectionInBidiTextfieldTest) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05d0\x05d1\x05d2"));
// Tap the textfield to invoke touch selection.
@@ -403,6 +415,10 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInBidiTextfieldTest) {
// Tests if the SelectRect callback is called appropriately when selection
// handles are moved.
TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("textfield with selected text"));
// Tap the textfield to invoke touch selection.
@@ -445,6 +461,10 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) {
}
TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05e1\x05e2\x05e3" L"def"));
// Tap the textfield to invoke touch selection.
@@ -573,6 +593,10 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) {
TEST_F(TouchSelectionControllerImplTest,
HiddenSelectionHandleRetainsCursorPosition) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
static const uint32_t selection_start = 10u;
SetupSelectionInvisibleHandle(selection_start);
// Drag the visible handle around and make sure the selection end point of the
@@ -591,6 +615,10 @@ TEST_F(TouchSelectionControllerImplTest,
// Tests that we can handle the hidden handle getting exposed as a result of a
// drag and that it maintains the correct orientation when exposed.
TEST_F(TouchSelectionControllerImplTest, HiddenSelectionHandleExposed) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
static const uint32_t selection_start = 0u;
SetupSelectionInvisibleHandle(selection_start);
@@ -608,6 +636,10 @@ TEST_F(TouchSelectionControllerImplTest, HiddenSelectionHandleExposed) {
TEST_F(TouchSelectionControllerImplTest,
DoubleTapInTextfieldWithCursorHandleShouldSelectText) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("some text"));
ui::test::EventGenerator generator(
@@ -707,6 +739,10 @@ class TestTouchEditable : public ui::TouchEditable {
// the cursor position relative to the client boundaries.
TEST_F(TouchSelectionControllerImplTest,
VisibilityOfHandleRegardingClientBounds) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateWidget();
TestTouchEditable touch_editable(widget_->GetNativeView());
@@ -754,6 +790,10 @@ TEST_F(TouchSelectionControllerImplTest,
}
TEST_F(TouchSelectionControllerImplTest, HandlesStackAboveParent) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
ui::EventTarget* root = GetContext();
ui::EventTargeter* targeter = root->GetEventTargeter();
@@ -792,6 +832,10 @@ TEST_F(TouchSelectionControllerImplTest, HandlesStackAboveParent) {
}
TEST_F(TouchSelectionControllerImplTest, MouseEventDeactivatesTouchSelection) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
EXPECT_FALSE(GetSelectionController());
@@ -833,6 +877,10 @@ TEST_F(TouchSelectionControllerImplTest, MouseEventDeactivatesTouchSelection) {
}
TEST_F(TouchSelectionControllerImplTest, MouseCaptureChangedEventIgnored) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
EXPECT_FALSE(GetSelectionController());
@@ -852,6 +900,10 @@ TEST_F(TouchSelectionControllerImplTest, MouseCaptureChangedEventIgnored) {
}
TEST_F(TouchSelectionControllerImplTest, KeyEventDeactivatesTouchSelection) {
+ // TODO: see comment in SetUp().
+ if (IsAuraMusClient())
+ return;
+
CreateTextfield();
EXPECT_FALSE(GetSelectionController());
« no previous file with comments | « ui/views/test/widget_test_mac.mm ('k') | ui/views/touchui/touch_selection_menu_runner_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698