Refactor WebRTC getUserMedia tests to be more explicit and clear.
This patch fixes a bunch of ambigous names, inlines a bunch of
unnecessary helper methods and gets rid of the magical global variable
gLocalStream.
In general, the first acquired stream had a first-class citizen status
that made tests with several streams very confusing. It was also
assumed to go together with the video tag local-view-1. This is still
true, but it has been made much more explicit in the code.
The tracing test still needs a "global", but I worked around that
problem by 1) letting the c++ code be in control of what that global
is and 2) stashing in in window[streamName] so it doesn't pollute the
rest of js code, which does not need this variable to be global.
The next step is to try to make the *TwoGetUserMedia* tests be more
parallel, or at least do less checks. They're too slow on Windows,
which causes them to flake.
BUG=417756
Review URL: https://codereview.chromium.org/
635833002
Cr-Commit-Position: refs/heads/master@{#298484}