| 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/test/test_timeouts.h" | 9 #include "base/test/test_timeouts.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 gesture_ack_callback_arrived_(false), | 36 gesture_ack_callback_arrived_(false), |
| 37 waiting_for_gesture_ack_callback_(false) {} | 37 waiting_for_gesture_ack_callback_(false) {} |
| 38 | 38 |
| 39 void Reset() { | 39 void Reset() { |
| 40 selection_changed_callback_arrived_ = false; | 40 selection_changed_callback_arrived_ = false; |
| 41 waiting_for_selection_changed_callback_ = false; | 41 waiting_for_selection_changed_callback_ = false; |
| 42 gesture_ack_callback_arrived_ = false; | 42 gesture_ack_callback_arrived_ = false; |
| 43 waiting_for_gesture_ack_callback_ = false; | 43 waiting_for_gesture_ack_callback_ = false; |
| 44 } | 44 } |
| 45 | 45 |
| 46 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 void GestureEventAck(int gesture_event_type) OVERRIDE { | 54 virtual void GestureEventAck(int gesture_event_type) OVERRIDE { |
| 55 gesture_ack_callback_arrived_ = true; | 55 gesture_ack_callback_arrived_ = true; |
| 56 TouchEditableImplAura::GestureEventAck(gesture_event_type); | 56 TouchEditableImplAura::GestureEventAck(gesture_event_type); |
| 57 if (waiting_for_gesture_ack_callback_) | 57 if (waiting_for_gesture_ack_callback_) |
| 58 gesture_ack_wait_run_loop_->Quit(); | 58 gesture_ack_wait_run_loop_->Quit(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void WaitForSelectionChangeCallback() { | 61 void WaitForSelectionChangeCallback() { |
| 62 if (selection_changed_callback_arrived_) | 62 if (selection_changed_callback_arrived_) |
| 63 return; | 63 return; |
| 64 waiting_for_selection_changed_callback_ = true; | 64 waiting_for_selection_changed_callback_ = true; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 TestTouchSelectionOnLongPress(); | 276 TestTouchSelectionOnLongPress(); |
| 277 } | 277 } |
| 278 | 278 |
| 279 // TODO(miu): Disabled test due to flakiness. http://crbug.com/235991 | 279 // TODO(miu): Disabled test due to flakiness. http://crbug.com/235991 |
| 280 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, | 280 IN_PROC_BROWSER_TEST_F(TouchEditableImplAuraTest, |
| 281 DISABLED_TouchCursorInTextfieldTest) { | 281 DISABLED_TouchCursorInTextfieldTest) { |
| 282 TestTouchCursorInTextfield(); | 282 TestTouchCursorInTextfield(); |
| 283 } | 283 } |
| 284 | 284 |
| 285 } // namespace content | 285 } // namespace content |
| OLD | NEW |