| OLD | NEW | 
|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stddef.h> | 5 #include <stddef.h> | 
| 6 | 6 | 
| 7 #include "base/logging.h" | 7 #include "base/logging.h" | 
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" | 
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" | 
| 10 #include "ui/events/gesture_detection/motion_event_buffer.h" | 10 #include "ui/events/gesture_detection/motion_event_buffer.h" | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 95       int bi = b.FindPointerIndexOfId(a.GetPointerId(i)); | 95       int bi = b.FindPointerIndexOfId(a.GetPointerId(i)); | 
| 96       ASSERT_NE(bi, -1); | 96       ASSERT_NE(bi, -1); | 
| 97       EXPECT_EQ(a.GetX(i), b.GetX(bi)); | 97       EXPECT_EQ(a.GetX(i), b.GetX(bi)); | 
| 98       EXPECT_EQ(a.GetY(i), b.GetY(bi)); | 98       EXPECT_EQ(a.GetY(i), b.GetY(bi)); | 
| 99       EXPECT_EQ(a.GetRawX(i), b.GetRawX(bi)); | 99       EXPECT_EQ(a.GetRawX(i), b.GetRawX(bi)); | 
| 100       EXPECT_EQ(a.GetRawY(i), b.GetRawY(bi)); | 100       EXPECT_EQ(a.GetRawY(i), b.GetRawY(bi)); | 
| 101       EXPECT_EQ(a.GetTouchMajor(i), b.GetTouchMajor(bi)); | 101       EXPECT_EQ(a.GetTouchMajor(i), b.GetTouchMajor(bi)); | 
| 102       EXPECT_EQ(a.GetTouchMinor(i), b.GetTouchMinor(bi)); | 102       EXPECT_EQ(a.GetTouchMinor(i), b.GetTouchMinor(bi)); | 
| 103       EXPECT_EQ(a.GetOrientation(i), b.GetOrientation(bi)); | 103       EXPECT_EQ(a.GetOrientation(i), b.GetOrientation(bi)); | 
| 104       EXPECT_EQ(a.GetPressure(i), b.GetPressure(bi)); | 104       EXPECT_EQ(a.GetPressure(i), b.GetPressure(bi)); | 
| 105       EXPECT_EQ(a.GetTilt(i), b.GetTilt(bi)); | 105       EXPECT_EQ(a.GetTiltX(i), b.GetTiltX(bi)); | 
|  | 106       EXPECT_EQ(a.GetTiltY(i), b.GetTiltY(bi)); | 
| 106       EXPECT_EQ(a.GetToolType(i), b.GetToolType(bi)); | 107       EXPECT_EQ(a.GetToolType(i), b.GetToolType(bi)); | 
| 107     } | 108     } | 
| 108 | 109 | 
| 109     if (ignore_history) | 110     if (ignore_history) | 
| 110       return; | 111       return; | 
| 111 | 112 | 
| 112     ASSERT_EQ(a.GetHistorySize(), b.GetHistorySize()); | 113     ASSERT_EQ(a.GetHistorySize(), b.GetHistorySize()); | 
| 113     for (size_t h = 0; h < a.GetHistorySize(); ++h) | 114     for (size_t h = 0; h < a.GetHistorySize(); ++h) | 
| 114       ExpectEqualsHistoryIndex(a, h, b); | 115       ExpectEqualsHistoryIndex(a, h, b); | 
| 115   } | 116   } | 
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 873 TEST_F(MotionEventBufferTest, Resampling150to60) { | 874 TEST_F(MotionEventBufferTest, Resampling150to60) { | 
| 874   base::TimeDelta flush_time_delta = | 875   base::TimeDelta flush_time_delta = | 
| 875       base::TimeDelta::FromMillisecondsD(1000. / 60.); | 876       base::TimeDelta::FromMillisecondsD(1000. / 60.); | 
| 876   base::TimeDelta event_time_delta = | 877   base::TimeDelta event_time_delta = | 
| 877       base::TimeDelta::FromMillisecondsD(1000. / 150.); | 878       base::TimeDelta::FromMillisecondsD(1000. / 150.); | 
| 878 | 879 | 
| 879   RunResample(flush_time_delta, event_time_delta); | 880   RunResample(flush_time_delta, event_time_delta); | 
| 880 } | 881 } | 
| 881 | 882 | 
| 882 }  // namespace ui | 883 }  // namespace ui | 
| OLD | NEW | 
|---|