| OLD | NEW |
| 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 "content/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <tuple> | 7 #include <tuple> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 TEST_F(RenderWidgetUnittest, TouchDuringOrOutsideFlingUmaMetrics) { | 344 TEST_F(RenderWidgetUnittest, TouchDuringOrOutsideFlingUmaMetrics) { |
| 345 EXPECT_CALL(*widget()->mock_webwidget(), handleInputEvent(_)) | 345 EXPECT_CALL(*widget()->mock_webwidget(), handleInputEvent(_)) |
| 346 .Times(3) | 346 .Times(3) |
| 347 .WillRepeatedly( | 347 .WillRepeatedly( |
| 348 ::testing::Return(blink::WebInputEventResult::NotHandled)); | 348 ::testing::Return(blink::WebInputEventResult::NotHandled)); |
| 349 | 349 |
| 350 SyntheticWebTouchEvent touch; | 350 SyntheticWebTouchEvent touch; |
| 351 touch.PressPoint(10, 10); | 351 touch.PressPoint(10, 10); |
| 352 touch.dispatchType = blink::WebInputEvent::DispatchType::Blocking; | 352 touch.dispatchType = blink::WebInputEvent::DispatchType::Blocking; |
| 353 touch.dispatchedDuringFling = false; | |
| 354 touch.touchStartOrFirstTouchMove = true; | 353 touch.touchStartOrFirstTouchMove = true; |
| 355 widget()->SendInputEvent(touch); | 354 widget()->SendInputEvent(touch); |
| 356 histogram_tester().ExpectTotalCount("Event.Touch.TouchLatencyOutsideFling", | 355 histogram_tester().ExpectTotalCount("Event.Touch.TouchLatencyOutsideFling", |
| 357 1); | 356 1); |
| 358 | 357 |
| 359 touch.MovePoint(0, 10, 10); | 358 touch.MovePoint(0, 10, 10); |
| 360 touch.touchStartOrFirstTouchMove = true; | 359 touch.touchStartOrFirstTouchMove = true; |
| 361 widget()->SendInputEvent(touch); | 360 widget()->SendInputEvent(touch); |
| 362 histogram_tester().ExpectTotalCount("Event.Touch.TouchLatencyOutsideFling", | 361 histogram_tester().ExpectTotalCount("Event.Touch.TouchLatencyOutsideFling", |
| 363 2); | 362 2); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 blink::WebRect popup_emulated_rect(130, 170, 100, 400); | 487 blink::WebRect popup_emulated_rect(130, 170, 100, 400); |
| 489 widget()->setWindowRect(popup_emulated_rect); | 488 widget()->setWindowRect(popup_emulated_rect); |
| 490 | 489 |
| 491 EXPECT_EQ(popup_emulated_rect.x, widget()->windowRect().x); | 490 EXPECT_EQ(popup_emulated_rect.x, widget()->windowRect().x); |
| 492 EXPECT_EQ(popup_emulated_rect.y, widget()->windowRect().y); | 491 EXPECT_EQ(popup_emulated_rect.y, widget()->windowRect().y); |
| 493 EXPECT_EQ(popup_emulated_rect.x, widget()->viewRect().x); | 492 EXPECT_EQ(popup_emulated_rect.x, widget()->viewRect().x); |
| 494 EXPECT_EQ(popup_emulated_rect.y, widget()->viewRect().y); | 493 EXPECT_EQ(popup_emulated_rect.y, widget()->viewRect().y); |
| 495 } | 494 } |
| 496 | 495 |
| 497 } // namespace content | 496 } // namespace content |
| OLD | NEW |