FilesAppBrowserTest: code and document the use of trusted events

Remove the concept of LegacyEvents: irrelevant. Instead change concept
to the use of Trusted JS Events, which are used to force Blink to send
Tab key events to the Files.App page under test (add a comment).

If we don't use trusted Events, Blink consumes Tab key events with its
default handlers and the Tab key never reaches the JS page under test.
This affects the browser tests involving "tabindex" -- they won't work
unless they receive Tab key JS Events [1].

Clean up the TestCase struct: remove the accessors, and access members
directly since all access is const anyway. Add a new struct EventTest,
to specialize TestCase for the few tests that need trusted Events.

No change in behavior, no new tests.

[1] see crbug.com/482121 crbug.com/480491

Bug: 836254,482121,480491
Change-Id: Ic1906c6033ccc65be43b2c8cbe1344e5ffec4655
Reviewed-on: https://chromium-review.googlesource.com/1072220
Reviewed-by: Stuart Langley <slangley@chromium.org>
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561777}
1 file changed