OLD | NEW |
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 "content/browser/web_contents/touch_editable_impl_aura.h" | 5 #include "content/browser/web_contents/touch_editable_impl_aura.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 ExecuteSyncJSFunction(view_host, "focus_textfield()"); | 344 ExecuteSyncJSFunction(view_host, "focus_textfield()"); |
345 LOG(INFO) << "Wait for selection to change."; | 345 LOG(INFO) << "Wait for selection to change."; |
346 touch_editable->WaitForSelectionChangeCallback(); | 346 touch_editable->WaitForSelectionChangeCallback(); |
347 | 347 |
348 // Tap textfield | 348 // Tap textfield |
349 touch_editable->Reset(); | 349 touch_editable->Reset(); |
350 LOG(INFO) << "Tap in the textfield."; | 350 LOG(INFO) << "Tap in the textfield."; |
351 generator.GestureTapAt(gfx::Point(bounds.x() + 50, bounds.y() + 40)); | 351 generator.GestureTapAt(gfx::Point(bounds.x() + 50, bounds.y() + 40)); |
352 LOG(INFO) << "Wait for selection to change."; | 352 LOG(INFO) << "Wait for selection to change."; |
353 touch_editable->WaitForSelectionChangeCallback(); | 353 touch_editable->WaitForSelectionChangeCallback(); |
354 LOG(INFO) << "Wait for tap-down ACK."; | 354 // No Tap Down Ack is coming, it's async. |
355 touch_editable->WaitForGestureAck(); // Wait for Tap Down Ack | |
356 touch_editable->Reset(); | 355 touch_editable->Reset(); |
357 LOG(INFO) << "Wait for tap ACK."; | 356 LOG(INFO) << "Wait for tap ACK."; |
358 touch_editable->WaitForGestureAck(); // Wait for Tap Ack. | 357 touch_editable->WaitForGestureAck(); // Wait for Tap Ack. |
359 | 358 |
360 LOG(INFO) << "Test the touch selection handle."; | 359 LOG(INFO) << "Test the touch selection handle."; |
361 // Check if cursor handle is showing. | 360 // Check if cursor handle is showing. |
362 ui::TouchSelectionController* controller = | 361 ui::TouchSelectionController* controller = |
363 touch_editable->touch_selection_controller_.get(); | 362 touch_editable->touch_selection_controller_.get(); |
364 EXPECT_NE(ui::TEXT_INPUT_TYPE_NONE, touch_editable->text_input_type_); | 363 EXPECT_NE(ui::TEXT_INPUT_TYPE_NONE, touch_editable->text_input_type_); |
365 EXPECT_TRUE(controller); | 364 EXPECT_TRUE(controller); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 TouchSelectionOnLongPressTest) { | 408 TouchSelectionOnLongPressTest) { |
410 TestTouchSelectionOnLongPress(); | 409 TestTouchSelectionOnLongPress(); |
411 } | 410 } |
412 | 411 |
413 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, | 412 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, |
414 TouchCursorInTextfieldTest) { | 413 TouchCursorInTextfieldTest) { |
415 TestTouchCursorInTextfield(); | 414 TestTouchCursorInTextfield(); |
416 } | 415 } |
417 | 416 |
418 } // namespace content | 417 } // namespace content |
OLD | NEW |