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

Side by Side Diff: content/browser/renderer_host/input/input_router_impl_unittest.cc

Issue 139983009: ui::LocatedEvent location() returns gfx::PointF (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Undo accidental change. Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/browser/renderer_host/input/gesture_event_queue.h" 9 #include "content/browser/renderer_host/input/gesture_event_queue.h"
10 #include "content/browser/renderer_host/input/input_router_client.h" 10 #include "content/browser/renderer_host/input/input_router_client.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 ASSERT_TRUE(MSG_T::Read(msg, &param)); 97 ASSERT_TRUE(MSG_T::Read(msg, &param));
98 EXPECT_EQ(arg1, param.a); 98 EXPECT_EQ(arg1, param.a);
99 EXPECT_EQ(arg2, param.b); 99 EXPECT_EQ(arg2, param.b);
100 } 100 }
101 101
102 #if defined(USE_AURA) 102 #if defined(USE_AURA)
103 bool TouchEventsAreEquivalent(const ui::TouchEvent& first, 103 bool TouchEventsAreEquivalent(const ui::TouchEvent& first,
104 const ui::TouchEvent& second) { 104 const ui::TouchEvent& second) {
105 if (first.type() != second.type()) 105 if (first.type() != second.type())
106 return false; 106 return false;
107 if (first.location() != second.location()) 107 if (gfx::ToFlooredPoint(first.location()) !=
108 gfx::ToFlooredPoint(second.location()))
108 return false; 109 return false;
109 if (first.touch_id() != second.touch_id()) 110 if (first.touch_id() != second.touch_id())
110 return false; 111 return false;
111 if (second.time_stamp().InSeconds() != first.time_stamp().InSeconds()) 112 if (second.time_stamp().InSeconds() != first.time_stamp().InSeconds())
112 return false; 113 return false;
113 return true; 114 return true;
114 } 115 }
115 116
116 bool EventListIsSubset(const ScopedVector<ui::TouchEvent>& subset, 117 bool EventListIsSubset(const ScopedVector<ui::TouchEvent>& subset,
117 const ScopedVector<ui::TouchEvent>& set) { 118 const ScopedVector<ui::TouchEvent>& set) {
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 1438
1438 // Ack the second scroll. 1439 // Ack the second scroll.
1439 SendInputEventACK(WebInputEvent::GestureScrollUpdate, 1440 SendInputEventACK(WebInputEvent::GestureScrollUpdate,
1440 INPUT_EVENT_ACK_STATE_CONSUMED); 1441 INPUT_EVENT_ACK_STATE_CONSUMED);
1441 EXPECT_EQ(0U, GetSentMessageCountAndResetSink()); 1442 EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
1442 EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount()); 1443 EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
1443 EXPECT_EQ(0, client_->in_flight_event_count()); 1444 EXPECT_EQ(0, client_->in_flight_event_count());
1444 } 1445 }
1445 1446
1446 } // namespace content 1447 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698