Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Issue 1474723002: Support setting just the Java Context for JUnit tests. (Closed)

Created:
5 years ago by Torne
Modified:
5 years ago
Reviewers:
dgn
CC:
chromium-reviews, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/62e9dc641bd5e3967e59165e7e41f0a897ce9c0f Cr-Commit-Position: refs/heads/master@{#361350}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M base/android/java/src/org/chromium/base/ContextUtils.java View 1 chunk +10 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
Torne
5 years ago (2015-11-24 14:44:09 UTC) #1
dgn
On 2015/11/24 14:44:09, Torne wrote: lgtm
5 years ago (2015-11-24 14:46:42 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1474723002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1474723002/1
5 years ago (2015-11-24 14:47:38 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years ago (2015-11-24 16:09:21 UTC) #6
commit-bot: I haz the power
5 years ago (2015-11-24 16:10:09 UTC) #7
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/62e9dc641bd5e3967e59165e7e41f0a897ce9c0f
Cr-Commit-Position: refs/heads/master@{#361350}

Powered by Google App Engine
This is Rietveld 408576698