diff options
author | Michael Chan <mchan@android.com> | 2011-01-19 14:49:37 -0800 |
---|---|---|
committer | Michael Chan <mchan@android.com> | 2011-01-19 17:31:36 -0800 |
commit | ece2fbd8c2695910148ffa20fb46a508443fd034 (patch) | |
tree | e8ac8fd98e112b0216edb9383c270b8b87412ca4 /tests | |
parent | 8307109ac75b748ae707f4d4cb9a9d28c2dbaae6 (diff) | |
download | android_packages_apps_Calendar-ece2fbd8c2695910148ffa20fb46a508443fd034.tar.gz android_packages_apps_Calendar-ece2fbd8c2695910148ffa20fb46a508443fd034.tar.bz2 android_packages_apps_Calendar-ece2fbd8c2695910148ffa20fb46a508443fd034.zip |
b/3370035 Fixed the date header of the widget to match the app/home timezone
Change-Id: Ifbbec14c73a106537ba123c464cc17e61c659bea
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/calendar/widget/CalendarAppWidgetServiceTest.java | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/tests/src/com/android/calendar/widget/CalendarAppWidgetServiceTest.java b/tests/src/com/android/calendar/widget/CalendarAppWidgetServiceTest.java index b851680e..32c87f51 100644 --- a/tests/src/com/android/calendar/widget/CalendarAppWidgetServiceTest.java +++ b/tests/src/com/android/calendar/widget/CalendarAppWidgetServiceTest.java @@ -85,7 +85,8 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { @SmallTest public void testGetAppWidgetModel_1Event() throws Exception { - CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext()); + CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time + .getCurrentTimezone()); MatrixCursor cursor = new MatrixCursor(CalendarAppWidgetService.EVENT_PROJECTION, 0); @@ -94,9 +95,6 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { cursor.addRow(getRow(0, now + ONE_HOUR, now + TWO_HOURS, title, location, 0)); // Expected Output - expected.mDayOfMonth = "1"; - expected.mDayOfWeek = "FRI"; - EventInfo eventInfo = new EventInfo(); eventInfo.visibWhen = View.VISIBLE; eventInfo.visibWhere = View.VISIBLE; @@ -116,7 +114,8 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { // TODO re-enable this test when our widget behavior is finalized @Suppress @SmallTest public void testGetAppWidgetModel_2StaggeredEvents() throws Exception { - CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext()); + CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time + .getCurrentTimezone()); MatrixCursor cursor = new MatrixCursor(CalendarAppWidgetService.EVENT_PROJECTION, 0); int i = 0; @@ -124,9 +123,6 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { long sunday = tomorrow + DateUtils.DAY_IN_MILLIS; // Expected Output - expected.mDayOfMonth = "1"; - expected.mDayOfWeek = "FRI"; - EventInfo eventInfo = new EventInfo(); eventInfo.visibWhen = View.VISIBLE; eventInfo.visibWhere = View.VISIBLE; @@ -164,15 +160,13 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { @SmallTest public void testGetAppWidgetModel_AllDayEventToday() throws Exception { final long now = 1262340000000L; // Fri Jan 01 2010 01:00:00 GMT-0700 (PDT) - CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext()); + CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time + .getCurrentTimezone()); MatrixCursor cursor = new MatrixCursor(CalendarAppWidgetService.EVENT_PROJECTION, 0); int i = 0; // Expected Output - expected.mDayOfMonth = "1"; - expected.mDayOfWeek = "FRI"; - EventInfo eventInfo = new EventInfo(); eventInfo.visibWhen = View.VISIBLE; eventInfo.visibWhere = View.VISIBLE; @@ -207,15 +201,13 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { @SmallTest public void testGetAppWidgetModel_AllDayEventTomorrow() throws Exception { final long now = 1262340000000L; // Fri Jan 01 2010 01:00:00 GMT-0700 (PDT) - CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext()); + CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time + .getCurrentTimezone()); MatrixCursor cursor = new MatrixCursor(CalendarAppWidgetService.EVENT_PROJECTION, 0); int i = 0; // Expected Output - expected.mDayOfMonth = "1"; - expected.mDayOfWeek = "FRI"; - EventInfo eventInfo = new EventInfo(); eventInfo.visibWhen = View.VISIBLE; eventInfo.visibWhere = View.VISIBLE; @@ -250,15 +242,13 @@ public class CalendarAppWidgetServiceTest extends AndroidTestCase { @SmallTest public void testGetAppWidgetModel_AllDayEventLater() throws Exception { final long now = 1262340000000L; // Fri Jan 01 2010 01:00:00 GMT-0700 (PDT) - CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext()); + CalendarAppWidgetModel expected = new CalendarAppWidgetModel(getContext(), Time + .getCurrentTimezone()); MatrixCursor cursor = new MatrixCursor(CalendarAppWidgetService.EVENT_PROJECTION, 0); int i = 0; // Expected Output - expected.mDayOfMonth = "1"; - expected.mDayOfWeek = "FRI"; - EventInfo eventInfo = new EventInfo(); eventInfo.visibWhen = View.VISIBLE; eventInfo.visibWhere = View.VISIBLE; |