| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/event_with_latency_info.h" | 5 #include "content/common/input/event_with_latency_info.h" |
| 6 | 6 |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "third_party/WebKit/public/web/WebInputEvent.h" | 8 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 9 | 9 |
| 10 using blink::WebGestureEvent; | 10 using blink::WebGestureEvent; |
| 11 using blink::WebInputEvent; | 11 using blink::WebInputEvent; |
| 12 using blink::WebMouseEvent; | 12 using blink::WebMouseEvent; |
| 13 using blink::WebMouseWheelEvent; | 13 using blink::WebMouseWheelEvent; |
| 14 using blink::WebTouchEvent; | 14 using blink::WebTouchEvent; |
| 15 | 15 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 ASSERT_TRUE(scroll_0.CanCoalesceWith(scroll_1)); | 100 ASSERT_TRUE(scroll_0.CanCoalesceWith(scroll_1)); |
| 101 scroll_0.CoalesceWith(scroll_1); | 101 scroll_0.CoalesceWith(scroll_1); |
| 102 // Coalescing WebGestureEvent preserves newer timestamp. | 102 // Coalescing WebGestureEvent preserves newer timestamp. |
| 103 EXPECT_EQ(10.0, scroll_0.event.timeStampSeconds); | 103 EXPECT_EQ(10.0, scroll_0.event.timeStampSeconds); |
| 104 ASSERT_EQ(1u, scroll_0.latency.coalesced_events_size()); | 104 ASSERT_EQ(1u, scroll_0.latency.coalesced_events_size()); |
| 105 EXPECT_EQ(5.0, scroll_0.latency.timestamps_of_coalesced_events()[0]); | 105 EXPECT_EQ(5.0, scroll_0.latency.timestamps_of_coalesced_events()[0]); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace | 108 } // namespace |
| 109 } // namespace content | 109 } // namespace content |
| OLD | NEW |