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/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 1655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1666 EXPECT_EQ(1U, pointer_state().GetPointerCount()); | 1666 EXPECT_EQ(1U, pointer_state().GetPointerCount()); |
1667 view_->OnTouchEvent(&release); | 1667 view_->OnTouchEvent(&release); |
1668 EXPECT_TRUE(release.synchronous_handling_disabled()); | 1668 EXPECT_TRUE(release.synchronous_handling_disabled()); |
1669 EXPECT_EQ(0U, pointer_state().GetPointerCount()); | 1669 EXPECT_EQ(0U, pointer_state().GetPointerCount()); |
1670 | 1670 |
1671 // Now start a touch event, and remove the event-handlers before the release. | 1671 // Now start a touch event, and remove the event-handlers before the release. |
1672 view_->OnTouchEvent(&press); | 1672 view_->OnTouchEvent(&press); |
1673 EXPECT_TRUE(press.synchronous_handling_disabled()); | 1673 EXPECT_TRUE(press.synchronous_handling_disabled()); |
1674 EXPECT_EQ(ui::MotionEvent::ACTION_DOWN, pointer_state().GetAction()); | 1674 EXPECT_EQ(ui::MotionEvent::ACTION_DOWN, pointer_state().GetAction()); |
1675 EXPECT_EQ(1U, pointer_state().GetPointerCount()); | 1675 EXPECT_EQ(1U, pointer_state().GetPointerCount()); |
1676 EXPECT_EQ(2U, GetSentMessageCountAndResetSink()); | 1676 EXPECT_EQ(3U, GetSentMessageCountAndResetSink()); |
1677 | 1677 |
1678 widget_host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false)); | 1678 widget_host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false)); |
1679 | 1679 |
1680 // All outstanding events should have already been sent but no new events | 1680 // All outstanding events should have already been sent but no new events |
1681 // should get sent. | 1681 // should get sent. |
1682 InputEventAck ack( | 1682 InputEventAck ack( |
1683 InputEventAckSource::COMPOSITOR_THREAD, blink::WebInputEvent::kTouchStart, | 1683 InputEventAckSource::COMPOSITOR_THREAD, blink::WebInputEvent::kTouchStart, |
1684 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, press.unique_event_id()); | 1684 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, press.unique_event_id()); |
1685 widget_host_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack)); | 1685 widget_host_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack)); |
1686 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); | 1686 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); |
(...skipping 3745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5432 // There is no composition in the beginning. | 5432 // There is no composition in the beginning. |
5433 EXPECT_FALSE(has_composition_text()); | 5433 EXPECT_FALSE(has_composition_text()); |
5434 SetHasCompositionTextToTrue(); | 5434 SetHasCompositionTextToTrue(); |
5435 view->ImeCancelComposition(); | 5435 view->ImeCancelComposition(); |
5436 // The composition must have been canceled. | 5436 // The composition must have been canceled. |
5437 EXPECT_FALSE(has_composition_text()); | 5437 EXPECT_FALSE(has_composition_text()); |
5438 } | 5438 } |
5439 } | 5439 } |
5440 | 5440 |
5441 } // namespace content | 5441 } // namespace content |
OLD | NEW |