am 72da3a46: am c404ed2b: Fix failing unit test; the test was using a deprecated API making it fail on WVGA devices.
Merge commit '72da3a467e46453e87549492ccec47e1feda6fe2' into eclair-mr2-plus-aosp * commit '72da3a467e46453e87549492ccec47e1feda6fe2': 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
|
@MediumTest
|
||||||
public void testDrawingCacheBelowMaximumSize() throws Exception {
|
public void testDrawingCacheBelowMaximumSize() throws Exception {
|
||||||
final int max = ViewConfiguration.getMaximumDrawingCacheSize();
|
final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize();
|
||||||
assertTrue(mTiny.getWidth() * mTiny.getHeight() * 2 < max);
|
assertTrue(mTiny.getWidth() * mTiny.getHeight() * 2 < max);
|
||||||
assertNotNull(createCacheForView(mTiny));
|
assertNotNull(createCacheForView(mTiny));
|
||||||
}
|
}
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void testDrawingCacheAboveMaximumSize() throws Exception {
|
public void testDrawingCacheAboveMaximumSize() throws Exception {
|
||||||
final int max = ViewConfiguration.getMaximumDrawingCacheSize();
|
final int max = ViewConfiguration.get(getActivity()).getScaledMaximumDrawingCacheSize();
|
||||||
assertTrue(mLarge.getWidth() * mLarge.getHeight() * 2 > max);
|
assertTrue(mLarge.getWidth() * mLarge.getHeight() * 2 > max);
|
||||||
assertNull(createCacheForView(mLarge));
|
assertNull(createCacheForView(mLarge));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user