aura: Sanitize the lifetime of aura::Env instance.
Currently, the aura::Env instance is created and/or destroyed from unexpected
places (e.g. WebContentsViewAura), and that makes it difficult to reason about
its lifetime. This patch tries to make this better. Notable changes:
. Instead of having the ash::Shell instance be responsible for creating the
aura::Env instance, make the creator of the Shell instance be responsible for
also creating the aura::Env instance.
. Individual TestSuite instances are responsible for managing the aura::Env
instance for the tests (content::UnitTestTestSuite, ash::AuraShellTestSuite)
. For chrome and browser-tests, the browser main-loop is responsible for
managing the aura::Env instance.
. For interactive-ui-tests that do not use the browser main-loop, each test
explicitly manages its aura::Env instance.
BUG=515031, 516898
TBR=avi@ for trivial change in content/browser/
Review URL: https://codereview.chromium.org/
1270173004
Cr-Commit-Position: refs/heads/master@{#342300}