am c404ed2b: Fix failing unit test; the test was using a deprecated API making it fail on WVGA devices.
Merge commit 'c404ed2be5d29c8932a3d69b53fea4653c9b868b' into eclair-mr2 * commit 'c404ed2be5d29c8932a3d69b53fea4653c9b868b': Fix failing unit test; the test was using a deprecated API making it fail on WVGA devices.
This commit is contained in:
@@ -55,14 +55,14 @@ public class BigCacheTest extends ActivityInstrumentationTestCase<BigCache> {
|
||||
|
||||
@MediumTest
|
||||
public void testDrawingCacheBelowMaximumSize() throws Exception {
|
||||
final int max = ViewConfiguration.getMaximumDrawingCacheSize();
|
||||
final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize();
|
||||
assertTrue(mTiny.getWidth() * mTiny.getHeight() * 2 < max);
|
||||
assertNotNull(createCacheForView(mTiny));
|
||||
}
|
||||
|
||||
@MediumTest
|
||||
public void testDrawingCacheAboveMaximumSize() throws Exception {
|
||||
final int max = ViewConfiguration.getMaximumDrawingCacheSize();
|
||||
final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize();
|
||||
assertTrue(mLarge.getWidth() * mLarge.getHeight() * 2 > max);
|
||||
assertNull(createCacheForView(mLarge));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user