| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 virtual void WaitForFlingStopCallback() { | 92 virtual void WaitForFlingStopCallback() { |
| 93 if (fling_stop_callback_arrived_) | 93 if (fling_stop_callback_arrived_) |
| 94 return; | 94 return; |
| 95 waiting_for_fling_stop_callback_ = true; | 95 waiting_for_fling_stop_callback_ = true; |
| 96 fling_stop_wait_run_loop_.reset(new base::RunLoop()); | 96 fling_stop_wait_run_loop_.reset(new base::RunLoop()); |
| 97 fling_stop_wait_run_loop_->Run(); | 97 fling_stop_wait_run_loop_->Run(); |
| 98 } | 98 } |
| 99 | 99 |
| 100 protected: | 100 protected: |
| 101 virtual ~TestTouchEditableImplAura() {} | 101 ~TestTouchEditableImplAura() override {} |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 bool selection_changed_callback_arrived_; | 104 bool selection_changed_callback_arrived_; |
| 105 bool waiting_for_selection_changed_callback_; | 105 bool waiting_for_selection_changed_callback_; |
| 106 WebInputEvent::Type waiting_for_gesture_ack_type_; | 106 WebInputEvent::Type waiting_for_gesture_ack_type_; |
| 107 WebInputEvent::Type last_gesture_ack_type_; | 107 WebInputEvent::Type last_gesture_ack_type_; |
| 108 bool fling_stop_callback_arrived_; | 108 bool fling_stop_callback_arrived_; |
| 109 bool waiting_for_fling_stop_callback_; | 109 bool waiting_for_fling_stop_callback_; |
| 110 scoped_ptr<base::RunLoop> selection_changed_wait_run_loop_; | 110 scoped_ptr<base::RunLoop> selection_changed_wait_run_loop_; |
| 111 scoped_ptr<base::RunLoop> gesture_ack_wait_run_loop_; | 111 scoped_ptr<base::RunLoop> gesture_ack_wait_run_loop_; |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 value = content::ExecuteScriptAndGetValue(main_frame, | 459 value = content::ExecuteScriptAndGetValue(main_frame, |
| 460 "get_cursor_position()"); | 460 "get_cursor_position()"); |
| 461 int new_cursor_pos = -1; | 461 int new_cursor_pos = -1; |
| 462 value->GetAsInteger(&new_cursor_pos); | 462 value->GetAsInteger(&new_cursor_pos); |
| 463 EXPECT_NE(-1, new_cursor_pos); | 463 EXPECT_NE(-1, new_cursor_pos); |
| 464 // Cursor should have moved. | 464 // Cursor should have moved. |
| 465 EXPECT_NE(new_cursor_pos, cursor_pos); | 465 EXPECT_NE(new_cursor_pos, cursor_pos); |
| 466 } | 466 } |
| 467 | 467 |
| 468 } // namespace content | 468 } // namespace content |
| OLD | NEW |