From 4c3a8ede019f8683a7d15defd995790c4b5ebdac Mon Sep 17 00:00:00 2001 From: Andrew Stadler Date: Thu, 9 Sep 2010 09:28:38 -0700 Subject: [PATCH] Quick fixes for account setup unit tests Some of these broke in 8bcb572ccfdac6974c111fe6dfc753a5e0d4e7ca which changed the [Next] button to an ActionBar menu item. However, the entirety of AccountSettingsXLTests needed to be disabled because the PreferenceActivity is very different on phone or XL sized devices, and the tests infrastructure will need to be refactored to deal with that (on another day.) Change-Id: I9adbfc9b8da6179e4c4e82d29bb872ee05619a41 --- .../activity/setup/AccountSetupExchange.java | 2 +- .../activity/setup/AccountSetupIncoming.java | 2 +- .../activity/setup/AccountSetupOutgoing.java | 2 +- .../setup/AccountSettingsXLTests.java | 8 ++++--- .../setup/AccountSetupExchangeTests.java | 19 +++++++---------- .../setup/AccountSetupIncomingTests.java | 21 ++++++++----------- .../setup/AccountSetupOutgoingTests.java | 21 ++++++++----------- 7 files changed, 34 insertions(+), 41 deletions(-) diff --git a/src/com/android/email/activity/setup/AccountSetupExchange.java b/src/com/android/email/activity/setup/AccountSetupExchange.java index d989432b5..34270aa89 100644 --- a/src/com/android/email/activity/setup/AccountSetupExchange.java +++ b/src/com/android/email/activity/setup/AccountSetupExchange.java @@ -70,7 +70,7 @@ public class AccountSetupExchange extends AccountSetupActivity implements AccountSetupExchangeFragment.Callback { /* package */ AccountSetupExchangeFragment mFragment; - private boolean mNextButtonEnabled; + /* package */ boolean mNextButtonEnabled; public static void actionIncomingSettings(Activity fromActivity, int mode, Account acct) { SetupData.init(mode, acct); diff --git a/src/com/android/email/activity/setup/AccountSetupIncoming.java b/src/com/android/email/activity/setup/AccountSetupIncoming.java index 2aa60ae46..1230e1bfd 100644 --- a/src/com/android/email/activity/setup/AccountSetupIncoming.java +++ b/src/com/android/email/activity/setup/AccountSetupIncoming.java @@ -27,7 +27,7 @@ public class AccountSetupIncoming extends AccountSetupActivity implements AccountSetupIncomingFragment.Callback { private AccountSetupIncomingFragment mFragment; - private boolean mNextButtonEnabled; + /* package */ boolean mNextButtonEnabled; public static void actionIncomingSettings(Activity fromActivity, int mode, EmailContent.Account account) { diff --git a/src/com/android/email/activity/setup/AccountSetupOutgoing.java b/src/com/android/email/activity/setup/AccountSetupOutgoing.java index c10a71c1b..56e192425 100644 --- a/src/com/android/email/activity/setup/AccountSetupOutgoing.java +++ b/src/com/android/email/activity/setup/AccountSetupOutgoing.java @@ -28,7 +28,7 @@ public class AccountSetupOutgoing extends Activity implements AccountSetupOutgoingFragment.Callback { private AccountSetupOutgoingFragment mFragment; - private boolean mNextButtonEnabled; + /* package */ boolean mNextButtonEnabled; public static void actionOutgoingSettings(Activity fromActivity, int mode, Account acct) { SetupData.init(mode, acct); diff --git a/tests/src/com/android/email/activity/setup/AccountSettingsXLTests.java b/tests/src/com/android/email/activity/setup/AccountSettingsXLTests.java index fd8abd63d..9c58b69a4 100644 --- a/tests/src/com/android/email/activity/setup/AccountSettingsXLTests.java +++ b/tests/src/com/android/email/activity/setup/AccountSettingsXLTests.java @@ -32,6 +32,8 @@ import android.test.suitebuilder.annotation.MediumTest; * Tests of basic UI logic in the Account Settings fragment. * * TODO: This should use a local provider for the test "accounts", and not touch user data + * TODO: These cannot run in the single-pane mode, and need to be refactored into single-pane + * and multi-pane versions. Until then, they are all disabled. * * To execute: runtest -c com.android.email.activity.setup.AccountSettingsXLTests email */ @@ -77,7 +79,7 @@ public class AccountSettingsXLTests extends ActivityInstrumentationTestCase2