Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2825523004: Revert of Add suppresion of slop region touches in browser (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/renderer_host/input/passthrough_touch_event_queue_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/passthrough_touch_event_queue_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698