Support setting just the Java Context for JUnit tests.

JUnit/Robolectric tests run on the host without native code and so can't
set the application context the usual way. Provide a test-only method to
set only the Java-side context for this purpose.

Move the assertion about not changing the set context to
initApplicationContext because the JUnit tests will use a different
mock context for each test case.

BUG=552419
R=dgn@chromium.org

Review URL: https://codereview.chromium.org/1474723002

Cr-Commit-Position: refs/heads/master@{#361350}


CrOS-Libchrome-Original-Commit: 62e9dc641bd5e3967e59165e7e41f0a897ce9c0f
1 file changed
tree: 076c5d9e67bc5d8c96bf112adf50f78294cbf9c3
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/