| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <tuple> | 8 #include <tuple> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "content/public/test/browser_test_utils.h" | 36 #include "content/public/test/browser_test_utils.h" |
| 37 #include "content/public/test/content_browser_test.h" | 37 #include "content/public/test/content_browser_test.h" |
| 38 #include "content/public/test/content_browser_test_utils.h" | 38 #include "content/public/test/content_browser_test_utils.h" |
| 39 #include "content/public/test/test_renderer_host.h" | 39 #include "content/public/test/test_renderer_host.h" |
| 40 #include "content/public/test/test_utils.h" | 40 #include "content/public/test/test_utils.h" |
| 41 #include "content/shell/browser/shell.h" | 41 #include "content/shell/browser/shell.h" |
| 42 #include "net/test/embedded_test_server/embedded_test_server.h" | 42 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 43 #include "ui/aura/window.h" | 43 #include "ui/aura/window.h" |
| 44 #include "ui/aura/window_tree_host.h" | 44 #include "ui/aura/window_tree_host.h" |
| 45 #include "ui/compositor/scoped_animation_duration_scale_mode.h" | 45 #include "ui/compositor/scoped_animation_duration_scale_mode.h" |
| 46 #include "ui/events/base_event_utils.h" |
| 46 #include "ui/events/event_processor.h" | 47 #include "ui/events/event_processor.h" |
| 47 #include "ui/events/event_utils.h" | 48 #include "ui/events/event_utils.h" |
| 48 #include "ui/events/test/event_generator.h" | 49 #include "ui/events/test/event_generator.h" |
| 49 | 50 |
| 50 #if defined(OS_WIN) | 51 #if defined(OS_WIN) |
| 51 #include "base/win/windows_version.h" | 52 #include "base/win/windows_version.h" |
| 52 #endif | 53 #endif |
| 53 | 54 |
| 54 namespace { | 55 namespace { |
| 55 | 56 |
| (...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 scroll_update, ui::LatencyInfo()); | 980 scroll_update, ui::LatencyInfo()); |
| 980 | 981 |
| 981 WaitAFrame(); | 982 WaitAFrame(); |
| 982 } | 983 } |
| 983 | 984 |
| 984 touch.ReleasePoint(0); | 985 touch.ReleasePoint(0); |
| 985 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, | 986 GetRenderWidgetHost()->ForwardTouchEventWithLatencyInfo(touch, |
| 986 ui::LatencyInfo()); | 987 ui::LatencyInfo()); |
| 987 WaitAFrame(); | 988 WaitAFrame(); |
| 988 | 989 |
| 989 blink::WebGestureEvent scroll_end; | 990 blink::WebGestureEvent scroll_end( |
| 990 scroll_end.type = blink::WebInputEvent::GestureScrollEnd; | 991 blink::WebInputEvent::GestureScrollEnd, |
| 992 blink::WebInputEvent::NoModifiers, |
| 993 ui::EventTimeStampToSeconds(ui::EventTimeForNow())); |
| 991 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo( | 994 GetRenderWidgetHost()->ForwardGestureEventWithLatencyInfo( |
| 992 scroll_end, ui::LatencyInfo()); | 995 scroll_end, ui::LatencyInfo()); |
| 993 WaitAFrame(); | 996 WaitAFrame(); |
| 994 | 997 |
| 995 if (!navigated) | 998 if (!navigated) |
| 996 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 999 EXPECT_EQ(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
| 997 else | 1000 else |
| 998 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); | 1001 EXPECT_GT(10, ExecuteScriptAndExtractInt("touchmoveCount")); |
| 999 } | 1002 } |
| 1000 } | 1003 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 details = dispatcher->OnEventFromSource(&release); | 1129 details = dispatcher->OnEventFromSource(&release); |
| 1127 ASSERT_FALSE(details.dispatcher_destroyed); | 1130 ASSERT_FALSE(details.dispatcher_destroyed); |
| 1128 WaitAFrame(); | 1131 WaitAFrame(); |
| 1129 | 1132 |
| 1130 EXPECT_LT(0, tracker.num_overscroll_updates()); | 1133 EXPECT_LT(0, tracker.num_overscroll_updates()); |
| 1131 EXPECT_FALSE(tracker.overscroll_completed()); | 1134 EXPECT_FALSE(tracker.overscroll_completed()); |
| 1132 } | 1135 } |
| 1133 } | 1136 } |
| 1134 | 1137 |
| 1135 } // namespace content | 1138 } // namespace content |
| OLD | NEW |