summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authortdresser <tdresser@chromium.org>2015-02-18 06:03:02 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-18 14:03:55 +0000
commit15af587aa589a52437130a85bd54f58281c456f8 (patch)
treec2b0499017c7d68fffbf1bca97acaa80636fefd4 /content
parent9db2707d31b649d641ad71c3c1ef23cf25e2d3bd (diff)
downloadchromium_src-15af587aa589a52437130a85bd54f58281c456f8.zip
chromium_src-15af587aa589a52437130a85bd54f58281c456f8.tar.gz
chromium_src-15af587aa589a52437130a85bd54f58281c456f8.tar.bz2
EventSender::GestureFlingStart requires a source device.
This is the third of three patches. The first allowed passing a source device to EventSender: https://codereview.chromium.org/902173003 The second passed a source device to EventSender: https://codereview.chromium.org/901323004 This patch requires passing a source device to event sender. BUG=456136 Review URL: https://codereview.chromium.org/934883002 Cr-Commit-Position: refs/heads/master@{#316812}
Diffstat (limited to 'content')
-rw-r--r--content/shell/renderer/test_runner/event_sender.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/content/shell/renderer/test_runner/event_sender.cc b/content/shell/renderer/test_runner/event_sender.cc
index 4352db3..1960be9 100644
--- a/content/shell/renderer/test_runner/event_sender.cc
+++ b/content/shell/renderer/test_runner/event_sender.cc
@@ -1661,16 +1661,9 @@ void EventSender::GestureFlingStart(float x,
WebGestureEvent event;
event.type = WebInputEvent::GestureFlingStart;
- // TODO(tdresser): Once we've migrated all calls to GestureFlingStart
- // to pass the device string, throw an error if args is empty. See
- // crbug.com/456136 for details.
- std::string device_string = kSourceDeviceStringTouchpad;
- if (!args->PeekNext().IsEmpty() && args->PeekNext()->IsString()) {
- if (!args->GetNext(&device_string)) {
- args->ThrowError();
- return;
- }
- }
+ std::string device_string;
+ if (!args->PeekNext().IsEmpty() && args->PeekNext()->IsString())
+ args->GetNext(&device_string);
if (device_string == kSourceDeviceStringTouchpad) {
event.sourceDevice = blink::WebGestureDeviceTouchpad;