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

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

Issue 818833004: Remove deprecated methods from Pickle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 using blink::WebTouchPoint; 42 using blink::WebTouchPoint;
43 43
44 namespace content { 44 namespace content {
45 45
46 namespace { 46 namespace {
47 47
48 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) { 48 const WebInputEvent* GetInputEventFromMessage(const IPC::Message& message) {
49 PickleIterator iter(message); 49 PickleIterator iter(message);
50 const char* data; 50 const char* data;
51 int data_length; 51 int data_length;
52 if (!message.ReadData(&iter, &data, &data_length)) 52 if (!iter.ReadData(&data, &data_length))
53 return NULL; 53 return NULL;
54 return reinterpret_cast<const WebInputEvent*>(data); 54 return reinterpret_cast<const WebInputEvent*>(data);
55 } 55 }
56 56
57 WebInputEvent& GetEventWithType(WebInputEvent::Type type) { 57 WebInputEvent& GetEventWithType(WebInputEvent::Type type) {
58 WebInputEvent* event = NULL; 58 WebInputEvent* event = NULL;
59 if (WebInputEvent::isMouseEventType(type)) { 59 if (WebInputEvent::isMouseEventType(type)) {
60 static WebMouseEvent mouse; 60 static WebMouseEvent mouse;
61 event = &mouse; 61 event = &mouse;
62 } else if (WebInputEvent::isTouchEventType(type)) { 62 } else if (WebInputEvent::isTouchEventType(type)) {
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 client_overscroll = client_->GetAndResetOverscroll(); 1899 client_overscroll = client_->GetAndResetOverscroll();
1900 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, 1900 EXPECT_EQ(wheel_overscroll.accumulated_overscroll,
1901 client_overscroll.accumulated_overscroll); 1901 client_overscroll.accumulated_overscroll);
1902 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, 1902 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta,
1903 client_overscroll.latest_overscroll_delta); 1903 client_overscroll.latest_overscroll_delta);
1904 EXPECT_EQ(wheel_overscroll.current_fling_velocity, 1904 EXPECT_EQ(wheel_overscroll.current_fling_velocity,
1905 client_overscroll.current_fling_velocity); 1905 client_overscroll.current_fling_velocity);
1906 } 1906 }
1907 1907
1908 } // namespace content 1908 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698