Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(769)

Unified Diff: content/browser/web_contents/web_contents_impl_unittest.cc

Issue 2052663004: Remove canScroll from WebMouseWheelEvent as it is unused now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix android unit test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl_unittest.cc
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index eb35542160a5d5a5a39e5ed5fa91fb3f5d94e7e9..70c2534e2caec5462e43aeee88340f07686c6ea6 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -2822,43 +2822,34 @@ TEST_F(WebContentsImplTest, HandleWheelEvent) {
EXPECT_FALSE(contents()->HandleWheelEvent(event));
EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
- modifiers = WebInputEvent::ShiftKey | WebInputEvent::AltKey |
- WebInputEvent::ControlKey;
- event =
- SyntheticWebMouseWheelEventBuilder::Build(0, 0, 0, 1, modifiers, false);
- EXPECT_FALSE(contents()->HandleWheelEvent(event));
- EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
-
- // But whenever the ctrl modifier is applied with canScroll=false, they can
- // increase/decrease zoom. Except on MacOS where we never want to adjust zoom
+ // But whenever the ctrl modifier is applied zoom can be increased or
+ // decreased. Except on MacOS where we never want to adjust zoom
// with mousewheel.
modifiers = WebInputEvent::ControlKey;
event =
SyntheticWebMouseWheelEventBuilder::Build(0, 0, 0, 1, modifiers, false);
- event.canScroll = false;
bool handled = contents()->HandleWheelEvent(event);
-#if defined(OS_MACOSX)
- EXPECT_FALSE(handled);
- EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
-#else
+#if defined(USE_AURA)
EXPECT_TRUE(handled);
EXPECT_EQ(1, delegate->GetAndResetContentsZoomChangedCallCount());
EXPECT_TRUE(delegate->last_zoom_in());
+#else
+ EXPECT_FALSE(handled);
+ EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
#endif
modifiers = WebInputEvent::ControlKey | WebInputEvent::ShiftKey |
WebInputEvent::AltKey;
event =
SyntheticWebMouseWheelEventBuilder::Build(0, 0, 2, -5, modifiers, false);
- event.canScroll = false;
handled = contents()->HandleWheelEvent(event);
-#if defined(OS_MACOSX)
- EXPECT_FALSE(handled);
- EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
-#else
+#if defined(USE_AURA)
EXPECT_TRUE(handled);
EXPECT_EQ(1, delegate->GetAndResetContentsZoomChangedCallCount());
EXPECT_FALSE(delegate->last_zoom_in());
+#else
+ EXPECT_FALSE(handled);
+ EXPECT_EQ(0, delegate->GetAndResetContentsZoomChangedCallCount());
#endif
// Unless there is no vertical movement.
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/common/input/synthetic_web_input_event_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698