Scope WebInputEvent types to enum namespaces.
WebInputEvent::Type and WebTouchPoint::State are adjusted in this change.
This allows us to alias this enumeration to a mojo defined type that
will come in another CL.
No functional changes in this CL, largely completed via sed.
Change-Id: I0657aacf782a437f9432e721bba349f8fdf797e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2159698
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#761210}
diff --git a/content/browser/renderer_host/overscroll_controller_unittest.cc b/content/browser/renderer_host/overscroll_controller_unittest.cc
index 31f8a0e..39d9e76 100644
--- a/content/browser/renderer_host/overscroll_controller_unittest.cc
+++ b/content/browser/renderer_host/overscroll_controller_unittest.cc
@@ -175,9 +175,9 @@
const base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchpad,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchpad, timestamp));
SimulateAck(false);
EXPECT_FALSE(SimulateGestureScrollUpdate(
@@ -222,9 +222,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchpad,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchpad, timestamp));
SimulateAck(false);
EXPECT_FALSE(SimulateGestureScrollUpdate(
@@ -280,9 +280,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchpad,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchpad, timestamp));
SimulateAck(false);
// Simulate a touchpad gesture scroll-update event that passes the start
@@ -310,9 +310,9 @@
timestamp += base::TimeDelta::FromSeconds(1);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -330,9 +330,9 @@
// Simulate a touchscreen gesture scroll-end which would normally end
// pull-to-refresh, and ACK it as not processed. Nothing should happen.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -349,9 +349,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchpad,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchpad, timestamp));
SimulateAck(false);
// Simulate a touchpad gesture scroll-update event that passes the start
@@ -378,9 +378,9 @@
timestamp += base::TimeDelta::FromSeconds(1);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -397,9 +397,9 @@
// Simulate a touchscreen gesture scroll-end and ACK it as not processed. It
// should abort pull-to-refresh.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -416,9 +416,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchpad,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchpad, timestamp));
SimulateAck(false);
// Simulate a touchpad gesture scroll-update event that passes the start
@@ -446,9 +446,9 @@
timestamp += base::TimeDelta::FromSeconds(1);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -465,9 +465,9 @@
// Simulate a touchscreen gesture scroll-end and ACK it as not processed. It
// should abort pull-to-refresh.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -512,9 +512,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -531,9 +531,9 @@
// Simulate a touchscreen gesture scroll-end which would normally end
// pull-to-refresh, and ACK it as not processed. Nothing should happen.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -543,9 +543,9 @@
// 2) Scroll before cool off -> PTR not triggered.
timestamp += base::TimeDelta::FromMilliseconds(500);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -563,9 +563,9 @@
// Simulate a touchscreen gesture scroll-end which would normally end
// pull-to-refresh, and ACK it as not processed. Nothing should happen.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -575,9 +575,9 @@
// 3) Scroll before cool off -> PTR not triggered.
timestamp += base::TimeDelta::FromMilliseconds(500);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -595,9 +595,9 @@
// Simulate a touchscreen gesture scroll-end which would normally end
// pull-to-refresh, and ACK it as not processed. Nothing should happen.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -607,9 +607,9 @@
// 4) Scroll after cool off -> PTR triggered.
timestamp += base::TimeDelta::FromSeconds(1);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -626,9 +626,9 @@
// Simulate a touchscreen gesture scroll-end which will end pull-to-refresh,
// and ACK it as not processed. Pull-to-refresh should be aborted.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -638,9 +638,9 @@
// 5) Scroll before cool off -> PTR triggered.
timestamp += base::TimeDelta::FromMilliseconds(500);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -657,9 +657,9 @@
// Simulate a touchscreen gesture scroll-end which will end pull-to-refresh,
// and ACK it as not processed. Pull-to-refresh should be aborted.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -681,9 +681,9 @@
base::TimeTicks timestamp =
blink::WebInputEvent::GetStaticTimeStampForTests();
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -700,9 +700,9 @@
// Simulate a touchscreen gesture scroll-end which would normally end
// pull-to-refresh, and ACK it as not processed. Nothing should happen.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -712,9 +712,9 @@
// 2) Scroll after cool off -> PTR triggered.
timestamp += base::TimeDelta::FromSeconds(1);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -731,9 +731,9 @@
// Simulate a touchscreen gesture scroll-end which will end pull-to-refresh,
// and ACK it as not processed. Pull-to-refresh should be aborted.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());
@@ -743,9 +743,9 @@
// 3) Scroll before cool off -> PTR triggered.
timestamp += base::TimeDelta::FromMilliseconds(500);
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollBegin,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollBegin,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
// Simulate a touchscreen gesture scroll-update event that passes the start
@@ -762,9 +762,9 @@
// Simulate a touchscreen gesture scroll-end which will end pull-to-refresh,
// and ACK it as not processed. Pull-to-refresh should be aborted.
- EXPECT_FALSE(SimulateGestureEvent(blink::WebInputEvent::kGestureScrollEnd,
- blink::WebGestureDevice::kTouchscreen,
- timestamp));
+ EXPECT_FALSE(
+ SimulateGestureEvent(blink::WebInputEvent::Type::kGestureScrollEnd,
+ blink::WebGestureDevice::kTouchscreen, timestamp));
SimulateAck(false);
EXPECT_EQ(OVERSCROLL_NONE, controller_mode());
EXPECT_EQ(OverscrollSource::NONE, controller_source());