Add web_test for gamepad re-entrancy crash

Recently it was discovered that calling navigator.getGamepads within an
event callback could cause re-entrancy which would cause the array that
was being processed for events to be changed out from underneath it.
This change adds a test for that scenario.  With the fix for 963416
reverted, the test fails with a crashing callstack that matches that in
963416, and with the fix in, the test passes as expected.

Bug: 965302
Change-Id: I9dcfd09ce744f19444877d7a20387f98e4fe60cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1622434
Auto-Submit: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Matt Reynolds <mattreynolds@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661861}
1 file changed