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

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

Issue 2816613003: Add suppresion of slop region touches in browser (Closed)
Patch Set: Rebase 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
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 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1686 EXPECT_EQ(1U, pointer_state().GetPointerCount()); 1686 EXPECT_EQ(1U, pointer_state().GetPointerCount());
1687 view_->OnTouchEvent(&release); 1687 view_->OnTouchEvent(&release);
1688 EXPECT_TRUE(release.synchronous_handling_disabled()); 1688 EXPECT_TRUE(release.synchronous_handling_disabled());
1689 EXPECT_EQ(0U, pointer_state().GetPointerCount()); 1689 EXPECT_EQ(0U, pointer_state().GetPointerCount());
1690 1690
1691 // Now start a touch event, and remove the event-handlers before the release. 1691 // Now start a touch event, and remove the event-handlers before the release.
1692 view_->OnTouchEvent(&press); 1692 view_->OnTouchEvent(&press);
1693 EXPECT_TRUE(press.synchronous_handling_disabled()); 1693 EXPECT_TRUE(press.synchronous_handling_disabled());
1694 EXPECT_EQ(ui::MotionEvent::ACTION_DOWN, pointer_state().GetAction()); 1694 EXPECT_EQ(ui::MotionEvent::ACTION_DOWN, pointer_state().GetAction());
1695 EXPECT_EQ(1U, pointer_state().GetPointerCount()); 1695 EXPECT_EQ(1U, pointer_state().GetPointerCount());
1696 EXPECT_EQ(3U, GetSentMessageCountAndResetSink()); 1696 EXPECT_EQ(2U, GetSentMessageCountAndResetSink());
1697 1697
1698 widget_host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false)); 1698 widget_host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false));
1699 1699
1700 // All outstanding events should have already been sent but no new events 1700 // All outstanding events should have already been sent but no new events
1701 // should get sent. 1701 // should get sent.
1702 InputEventAck ack( 1702 InputEventAck ack(
1703 InputEventAckSource::COMPOSITOR_THREAD, blink::WebInputEvent::kTouchStart, 1703 InputEventAckSource::COMPOSITOR_THREAD, blink::WebInputEvent::kTouchStart,
1704 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, press.unique_event_id()); 1704 INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS, press.unique_event_id());
1705 widget_host_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack)); 1705 widget_host_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack));
1706 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); 1706 EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
(...skipping 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after
5444 // There is no composition in the beginning. 5444 // There is no composition in the beginning.
5445 EXPECT_FALSE(has_composition_text()); 5445 EXPECT_FALSE(has_composition_text());
5446 SetHasCompositionTextToTrue(); 5446 SetHasCompositionTextToTrue();
5447 view->ImeCancelComposition(); 5447 view->ImeCancelComposition();
5448 // The composition must have been canceled. 5448 // The composition must have been canceled.
5449 EXPECT_FALSE(has_composition_text()); 5449 EXPECT_FALSE(has_composition_text());
5450 } 5450 }
5451 } 5451 }
5452 5452
5453 } // namespace content 5453 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698