Index: chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm |
diff --git a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm |
index 226bb7372f1fd7e53c55d121f7e93b72ec790d15..58fac22e45c1225454c23526ce4c6d8c391099b7 100644 |
--- a/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm |
+++ b/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper_unit_test.mm |
@@ -168,7 +168,9 @@ |
moveGestureAtPoint(makePoint(0.5, 0.5)); |
// Callbacks from blink to set the relevant state for history swiping. |
- [historySwiper_ gotWheelEventConsumed:NO]; |
+ [historySwiper_ gotUnhandledWheelEvent]; |
+ [historySwiper_ scrollOffsetPinnedToLeft:YES toRight:YES]; |
+ [historySwiper_ setHasHorizontalScrollbar:NO]; |
} |
void MacHistorySwiperTest::moveGestureAtPoint(NSPoint point) { |
@@ -320,7 +322,9 @@ |
EXPECT_EQ(end_count_, 0); |
// Callbacks from blink to set the relevant state for history swiping. |
- [historySwiper_ gotWheelEventConsumed:NO]; |
+ [historySwiper_ gotUnhandledWheelEvent]; |
+ [historySwiper_ scrollOffsetPinnedToLeft:YES toRight:YES]; |
+ [historySwiper_ setHasHorizontalScrollbar:NO]; |
momentumMoveGestureAtPoint(makePoint(0.2, 0.5)); |
EXPECT_EQ(begin_count_, 1); |
@@ -350,7 +354,9 @@ |
[historySwiper_ handleEvent:scrollEvent]; |
// Callbacks from blink to set the relevant state for history swiping. |
- [historySwiper_ gotWheelEventConsumed:NO]; |
+ [historySwiper_ gotUnhandledWheelEvent]; |
+ [historySwiper_ scrollOffsetPinnedToLeft:YES toRight:YES]; |
+ [historySwiper_ setHasHorizontalScrollbar:NO]; |
// Send a momentum move gesture. |
scrollEvent = |
@@ -400,23 +406,3 @@ |
NSEvent* beganEvent = scrollWheelEventWithPhase(NSEventPhaseBegan); |
EXPECT_FALSE([historySwiper_ handleEvent:beganEvent]); |
} |
- |
-// If any event is handled by blink, history swiping should not trigger. |
-TEST_F(MacHistorySwiperTest, EventHandledByBlink) { |
- // These tests require 10.7+ APIs. |
- if (![NSEvent |
- respondsToSelector:@selector(isSwipeTrackingFromScrollEventsEnabled)]) |
- return; |
- |
- startGestureInMiddle(); |
- moveGestureInMiddle(); |
- |
- // An event is handled by blink. |
- [historySwiper_ gotWheelEventConsumed:YES]; |
- |
- // A new event comes in, that isn't handled by blink. |
- moveGestureAtPoint(makePoint(0.2, 0.5)); |
- [historySwiper_ gotWheelEventConsumed:NO]; |
- |
- EXPECT_EQ(begin_count_, 0); |
-} |