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

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

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 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 <math.h> 5 #include <math.h>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 event = &wheel; 73 event = &wheel;
74 } 74 }
75 CHECK(event); 75 CHECK(event);
76 event->type = type; 76 event->type = type;
77 return *event; 77 return *event;
78 } 78 }
79 79
80 bool GetIsShortcutFromHandleInputEventMessage(const IPC::Message* msg) { 80 bool GetIsShortcutFromHandleInputEventMessage(const IPC::Message* msg) {
81 InputMsg_HandleInputEvent::Schema::Param param; 81 InputMsg_HandleInputEvent::Schema::Param param;
82 InputMsg_HandleInputEvent::Read(msg, &param); 82 InputMsg_HandleInputEvent::Read(msg, &param);
83 return get<2>(param); 83 return base::get<2>(param);
84 } 84 }
85 85
86 template<typename MSG_T, typename ARG_T1> 86 template<typename MSG_T, typename ARG_T1>
87 void ExpectIPCMessageWithArg1(const IPC::Message* msg, const ARG_T1& arg1) { 87 void ExpectIPCMessageWithArg1(const IPC::Message* msg, const ARG_T1& arg1) {
88 ASSERT_EQ(MSG_T::ID, msg->type()); 88 ASSERT_EQ(MSG_T::ID, msg->type());
89 typename MSG_T::Schema::Param param; 89 typename MSG_T::Schema::Param param;
90 ASSERT_TRUE(MSG_T::Read(msg, &param)); 90 ASSERT_TRUE(MSG_T::Read(msg, &param));
91 EXPECT_EQ(arg1, get<0>(param)); 91 EXPECT_EQ(arg1, base::get<0>(param));
92 } 92 }
93 93
94 template<typename MSG_T, typename ARG_T1, typename ARG_T2> 94 template<typename MSG_T, typename ARG_T1, typename ARG_T2>
95 void ExpectIPCMessageWithArg2(const IPC::Message* msg, 95 void ExpectIPCMessageWithArg2(const IPC::Message* msg,
96 const ARG_T1& arg1, 96 const ARG_T1& arg1,
97 const ARG_T2& arg2) { 97 const ARG_T2& arg2) {
98 ASSERT_EQ(MSG_T::ID, msg->type()); 98 ASSERT_EQ(MSG_T::ID, msg->type());
99 typename MSG_T::Schema::Param param; 99 typename MSG_T::Schema::Param param;
100 ASSERT_TRUE(MSG_T::Read(msg, &param)); 100 ASSERT_TRUE(MSG_T::Read(msg, &param));
101 EXPECT_EQ(arg1, get<0>(param)); 101 EXPECT_EQ(arg1, base::get<0>(param));
102 EXPECT_EQ(arg2, get<1>(param)); 102 EXPECT_EQ(arg2, base::get<1>(param));
103 } 103 }
104 104
105 #if defined(USE_AURA) 105 #if defined(USE_AURA)
106 bool TouchEventsAreEquivalent(const ui::TouchEvent& first, 106 bool TouchEventsAreEquivalent(const ui::TouchEvent& first,
107 const ui::TouchEvent& second) { 107 const ui::TouchEvent& second) {
108 if (first.type() != second.type()) 108 if (first.type() != second.type())
109 return false; 109 return false;
110 if (first.location() != second.location()) 110 if (first.location() != second.location())
111 return false; 111 return false;
112 if (first.touch_id() != second.touch_id()) 112 if (first.touch_id() != second.touch_id())
(...skipping 1718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1831 client_overscroll = client_->GetAndResetOverscroll(); 1831 client_overscroll = client_->GetAndResetOverscroll();
1832 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, 1832 EXPECT_EQ(wheel_overscroll.accumulated_overscroll,
1833 client_overscroll.accumulated_overscroll); 1833 client_overscroll.accumulated_overscroll);
1834 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, 1834 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta,
1835 client_overscroll.latest_overscroll_delta); 1835 client_overscroll.latest_overscroll_delta);
1836 EXPECT_EQ(wheel_overscroll.current_fling_velocity, 1836 EXPECT_EQ(wheel_overscroll.current_fling_velocity,
1837 client_overscroll.current_fling_velocity); 1837 client_overscroll.current_fling_velocity);
1838 } 1838 }
1839 1839
1840 } // namespace content 1840 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698