[ChromeDriver] Fix matching of input source types

When a Perform Actions command uses multiple input sources, the code
was looping through the sources in the forward direction, but was
looping through the source types in the backward direction, causing
mismatches and errors. This is now fixed. Also fixing inconsistent
property usages between key actions and pointer actions.

We are still dispatching action events in the wrong order (by source,
instead of by time). That will be fixed in a future CL.

Bug: chromedriver:1897
Change-Id: Iff9259b4deb81a60d3614968c2681ac543e3c3a5
Reviewed-on: https://chromium-review.googlesource.com/c/1379111
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616893}
2 files changed