diff options
| author | Ben Komalo <benkomalo@google.com> | 2011-07-15 14:05:52 -0700 |
|---|---|---|
| committer | Ben Komalo <benkomalo@google.com> | 2011-07-15 16:47:36 -0700 |
| commit | 0796b8aa61d6782a425e68cd77763ea1e701e592 (patch) | |
| tree | 38c718e11f776212b73bf73096aaa91aa08514b2 /tests | |
| parent | 1086830bae3d16026136fc40e926eb26e47e449e (diff) | |
| download | android_packages_apps_Email-0796b8aa61d6782a425e68cd77763ea1e701e592.tar.gz android_packages_apps_Email-0796b8aa61d6782a425e68cd77763ea1e701e592.tar.bz2 android_packages_apps_Email-0796b8aa61d6782a425e68cd77763ea1e701e592.zip | |
Don't save empty drafts.
Note: all unicode sending unit tests are broken due to chip issues. I've
filed a separate bug on that.
Bug: 5012204
Change-Id: I17392f65e5bd8349780b79d9cbe10492d8e7a7d9
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/src/com/android/email/activity/MessageComposeTests.java | 56 |
1 files changed, 1 insertions, 55 deletions
diff --git a/tests/src/com/android/email/activity/MessageComposeTests.java b/tests/src/com/android/email/activity/MessageComposeTests.java index a2e607cc4..9af9a96e2 100644 --- a/tests/src/com/android/email/activity/MessageComposeTests.java +++ b/tests/src/com/android/email/activity/MessageComposeTests.java @@ -617,7 +617,7 @@ public class MessageComposeTests * * In this case, we're doing a "reply all" * The user is CC2 (a "cc" recipient) - * The to should be: FROM, + * The to should be: FROM, * The cc should be: TO1, TO2, CC1 and CC3 (CC2 is our account's email address) */ public void testReplyAllAddresses2() throws Throwable { @@ -1001,60 +1001,6 @@ public class MessageComposeTests } - /** - * Tests for the comma-inserting logic. The logic is applied equally to To: Cc: and Bcc: - * but we only run the full set on To: - */ - public void testCommaInserting() throws Throwable { - if (!TestUtils.isScreenOnAndNotLocked(mContext)) { - Log.w(Logging.LOG_TAG, "SKIP testCommaInserting: Screen off or locked"); - return; - } - - // simple appending cases - checkCommaInsert("a", "", false); - checkCommaInsert("a@", "", false); - checkCommaInsert("a@b", "", false); - checkCommaInsert("a@b.", "", true); // non-optimal, but matches current implementation - checkCommaInsert("a@b.c", "", true); - - // confirm works properly for internal editing - checkCommaInsert("me@foo.com, you", " they@bar.com", false); - checkCommaInsert("me@foo.com, you@", "they@bar.com", false); - checkCommaInsert("me@foo.com, you@bar", " they@bar.com", false); - checkCommaInsert("me@foo.com, you@bar.", " they@bar.com", true); // non-optimal - checkCommaInsert("me@foo.com, you@bar.com", " they@bar.com", true); - - // check a couple of multi-period cases - checkCommaInsert("me.myself@foo", "", false); - checkCommaInsert("me.myself@foo.com", "", true); - checkCommaInsert("me@foo.co.uk", "", true); - - // cases that should not append because there's already a comma - checkCommaInsert("a@b.c,", "", false); - checkCommaInsert("me@foo.com, you@bar.com,", " they@bar.com", false); - checkCommaInsert("me.myself@foo.com,", "", false); - checkCommaInsert("me@foo.co.uk,", "", false); - } - - /** - * Check comma insertion logic for a single try on the To: field - */ - private void checkCommaInsert(final String before, final String after, boolean expectComma) - throws Throwable { - String expect = new String(before + (expectComma ? ", " : " ") + after); - - runTestOnUiThread(new Runnable() { - public void run() { - mToView.setText(before + after); - mToView.setSelection(before.length()); - } - }); - getInstrumentation().sendStringSync(" "); - String result = mToView.getText().toString(); - assertEquals(expect, result); - } - private static int sAttachmentId = 1; private Attachment makeAttachment(String filename) { Attachment a = new Attachment(); |
