diff options
author | tbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 22:47:21 +0000 |
---|---|---|
committer | tbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-31 22:47:21 +0000 |
commit | 67b9442d4fad38bef9032601f7f4ec238d5d7ed1 (patch) | |
tree | e87841cf4db7967a5b1de5e43bba0fd5077a535b /sync/test | |
parent | 860498670292327042945806eb1b9a25cacf0c63 (diff) | |
download | chromium_src-67b9442d4fad38bef9032601f7f4ec238d5d7ed1.zip chromium_src-67b9442d4fad38bef9032601f7f4ec238d5d7ed1.tar.gz chromium_src-67b9442d4fad38bef9032601f7f4ec238d5d7ed1.tar.bz2 |
Revert 214841 "Fix issue with null-value OAuth2 tokens for Android."
Broke check_deps on chromium.linux: http://build.chromium.org/p/chromium.linux/builders/Linux%20Builder/builds/12317/steps/check_deps/logs/stdio
ERROR in src/chrome/android/javatests/src/org/chromium/chrome/browser/signin/AndroidProfileOAuth2TokenServiceHelperTest.java
Illegal include: "sync/android/java/src/org/chromium/sync/signin/AccountManagerHelper.java"
Because of no rule applying.
Illegal include: "sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java"
Because of no rule applying.
Illegal include: "sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java"
Because of no rule applying.
FAILED
> Fix issue with null-value OAuth2 tokens for Android.
>
> Currently, AndroidProfileOAuth2TokenServiceHelper crashes if the auth
> token returned from the account manager is null. This CL makes it
> possible to get null tokens back.
>
> A test is also added, and the test harness is improved to support adding
> null auth-tokens.
>
> BUG=239491
> NOTRY=true
>
> Review URL: https://chromiumcodereview.appspot.com/20692003
TBR=nyquist@chromium.org
Review URL: https://codereview.chromium.org/21427002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test')
-rw-r--r-- | sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java | 4 | ||||
-rw-r--r-- | sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java | 4 |
2 files changed, 1 insertions, 7 deletions
diff --git a/sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java b/sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java index cff504c..1b346a1 100644 --- a/sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java +++ b/sync/test/android/javatests/src/org/chromium/sync/test/util/AccountHolder.java @@ -48,10 +48,6 @@ public class AccountHolder { return mPassword; } - public boolean hasAuthTokenRegistered(String authTokenType) { - return mAuthTokens.containsKey(authTokenType); - } - public String getAuthToken(String authTokenType) { return mAuthTokens.get(authTokenType); } diff --git a/sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java b/sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java index cb330b8..da16fae 100644 --- a/sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java +++ b/sync/test/android/javatests/src/org/chromium/sync/test/util/MockAccountManager.java @@ -264,9 +264,7 @@ public class MockAccountManager implements AccountManagerDelegate { private String internalGenerateAndStoreAuthToken(AccountHolder ah, String authTokenType) { synchronized (mAccounts) { - // Some tests register auth tokens with value null, and those should be preserved. - if (!ah.hasAuthTokenRegistered(authTokenType) && - ah.getAuthToken(authTokenType) == null) { + if (ah.getAuthToken(authTokenType) == null) { // No authtoken registered. Need to create one. String authToken = UUID.randomUUID().toString(); Log.d(TAG, "Created new auth token for " + ah.getAccount() + |