| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, | 46 virtual void OnSelectionOrCursorChanged(const gfx::Rect& anchor, |
| 47 const gfx::Rect& focus) OVERRIDE { | 47 const gfx::Rect& focus) OVERRIDE { |
| 48 selection_changed_callback_arrived_ = true; | 48 selection_changed_callback_arrived_ = true; |
| 49 TouchEditableImplAura::OnSelectionOrCursorChanged(anchor, focus); | 49 TouchEditableImplAura::OnSelectionOrCursorChanged(anchor, focus); |
| 50 if (waiting_for_selection_changed_callback_) | 50 if (waiting_for_selection_changed_callback_) |
| 51 selection_changed_wait_run_loop_->Quit(); | 51 selection_changed_wait_run_loop_->Quit(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 virtual void GestureEventAck(int gesture_event_type) OVERRIDE { | 54 virtual void GestureEventAck(int gesture_event_type, |
| 55 InputEventAckState ack_result) OVERRIDE { |
| 55 gesture_ack_callback_arrived_ = true; | 56 gesture_ack_callback_arrived_ = true; |
| 56 TouchEditableImplAura::GestureEventAck(gesture_event_type); | 57 TouchEditableImplAura::GestureEventAck(gesture_event_type); |
| 57 if (waiting_for_gesture_ack_callback_) | 58 if (waiting_for_gesture_ack_callback_) |
| 58 gesture_ack_wait_run_loop_->Quit(); | 59 gesture_ack_wait_run_loop_->Quit(); |
| 59 } | 60 } |
| 60 | 61 |
| 61 void WaitForSelectionChangeCallback() { | 62 void WaitForSelectionChangeCallback() { |
| 62 if (selection_changed_callback_arrived_) | 63 if (selection_changed_callback_arrived_) |
| 63 return; | 64 return; |
| 64 waiting_for_selection_changed_callback_ = true; | 65 waiting_for_selection_changed_callback_ = true; |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 TestTouchSelectionOnLongPress(); | 349 TestTouchSelectionOnLongPress(); |
| 349 } | 350 } |
| 350 | 351 |
| 351 // TODO(miu): Disabled test due to flakiness. http://crbug.com/235991 | 352 // TODO(miu): Disabled test due to flakiness. http://crbug.com/235991 |
| 352 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, | 353 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, |
| 353 DISABLED_TouchCursorInTextfieldTest) { | 354 DISABLED_TouchCursorInTextfieldTest) { |
| 354 TestTouchCursorInTextfield(); | 355 TestTouchCursorInTextfield(); |
| 355 } | 356 } |
| 356 | 357 |
| 357 } // namespace content | 358 } // namespace content |
| OLD | NEW |