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

Side by Side Diff: ui/android/junit/src/org/chromium/ui/picker/DateDialogNormalizerTest.java

Issue 2243353002: (Reland) Update all Robolectric tests to Robolectric 3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/android/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.ui.picker; 5 package org.chromium.ui.picker;
6 6
7 import static org.junit.Assert.assertEquals; 7 import static org.junit.Assert.assertEquals;
8 8
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.widget.DatePicker; 10 import android.widget.DatePicker;
11 11
12 import org.chromium.testing.local.LocalRobolectricTestRunner; 12 import org.chromium.testing.local.LocalRobolectricTestRunner;
13 import org.junit.Before; 13 import org.junit.Before;
14 import org.junit.Test; 14 import org.junit.Test;
15 import org.junit.runner.RunWith; 15 import org.junit.runner.RunWith;
16 import org.robolectric.Robolectric; 16 import org.robolectric.Robolectric;
17 import org.robolectric.annotation.Config; 17 import org.robolectric.annotation.Config;
18 18
19 import java.util.TimeZone; 19 import java.util.TimeZone;
20 20
21 /** 21 /**
22 * Tests for DateDialogNormalizer. 22 * Tests for DateDialogNormalizer.
23 */ 23 */
24 @RunWith(LocalRobolectricTestRunner.class) 24 @RunWith(LocalRobolectricTestRunner.class)
25 @Config(manifest = Config.NONE) 25 // sdk 18 is used due to a bug in Robolectric, crbug.com/635199
26 @Config(manifest = Config.NONE, sdk = 18)
26 public class DateDialogNormalizerTest { 27 public class DateDialogNormalizerTest {
27 28
28 private static final long MILLIS_PER_MINUTE = 60 * 1000; 29 private static final long MILLIS_PER_MINUTE = 60 * 1000;
29 private static final long MILLIS_PER_HOUR = 60 * 60 * 1000; 30 private static final long MILLIS_PER_HOUR = 60 * 60 * 1000;
30 private static final long PST_OFFSET_MILLIS = 8 * MILLIS_PER_HOUR; 31 private static final long PST_OFFSET_MILLIS = 8 * MILLIS_PER_HOUR;
31 private static final long JAPAN_OFFSET_MILLIS = -9 * MILLIS_PER_HOUR; 32 private static final long JAPAN_OFFSET_MILLIS = -9 * MILLIS_PER_HOUR;
32 33
33 private static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone("GMT"); 34 private static final TimeZone GMT_TIME_ZONE = TimeZone.getTimeZone("GMT");
34 private static final TimeZone PST_TIME_ZONE = TimeZone.getTimeZone("GMT-08") ; 35 private static final TimeZone PST_TIME_ZONE = TimeZone.getTimeZone("GMT-08") ;
35 private static final TimeZone JAPAN_TIME_ZONE = TimeZone.getTimeZone("Japan" ); // GMT+09 36 private static final TimeZone JAPAN_TIME_ZONE = TimeZone.getTimeZone("Japan" ); // GMT+09
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 run(GMT_TIME_ZONE, 151 run(GMT_TIME_ZONE,
151 2001, 3, 4, MARCH_15_3456, DECEMBER_31_5000, 152 2001, 3, 4, MARCH_15_3456, DECEMBER_31_5000,
152 3456, 2, 15, MARCH_15_3456, DECEMBER_31_5000); 153 3456, 2, 15, MARCH_15_3456, DECEMBER_31_5000);
153 run(GMT_TIME_ZONE, 154 run(GMT_TIME_ZONE,
154 10001, 3, 4, MARCH_15_3456, DECEMBER_31_5000, 155 10001, 3, 4, MARCH_15_3456, DECEMBER_31_5000,
155 5000, 11, 31, MARCH_15_3456, DECEMBER_31_5000); 156 5000, 11, 31, MARCH_15_3456, DECEMBER_31_5000);
156 157
157 TimeZone.setDefault(originalDefaultTimeZone); 158 TimeZone.setDefault(originalDefaultTimeZone);
158 } 159 }
159 } 160 }
OLDNEW
« no previous file with comments | « ui/android/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698