зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1388396 - bustage: Fix testBitmapNotScaledMoreThanTwoTimesTheSize. r=mcomella
MozReview-Commit-ID: BZ6dt5FE7FD --HG-- extra : rebase_source : 03840fc19897f0c09f05ea46c8d2bfd404e3180e
This commit is contained in:
Родитель
244d92b88c
Коммит
5572780f08
|
@ -77,10 +77,11 @@ public class TestResizingProcessor {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void testBitmapIsNotScaledMoreThanTwoTimesTheSize() {
|
||||
public void testBitmapIsNotScaledMoreThanMaxScaleFactor() {
|
||||
final IconRequest request = createTestRequest();
|
||||
|
||||
final Bitmap bitmap = createBitmapMock(5);
|
||||
final int initialSize = 5;
|
||||
final Bitmap bitmap = createBitmapMock(initialSize);
|
||||
final IconResponse response = spy(IconResponse.create(bitmap));
|
||||
|
||||
final ResizingProcessor processor = spy(new ResizingProcessor());
|
||||
|
@ -88,7 +89,7 @@ public class TestResizingProcessor {
|
|||
doReturn(resizedBitmap).when(processor).resize(any(Bitmap.class), anyInt());
|
||||
processor.process(request, response);
|
||||
|
||||
verify(processor).resize(bitmap, 10);
|
||||
verify(processor).resize(bitmap, initialSize * ResizingProcessor.MAX_SCALE_FACTOR);
|
||||
verify(bitmap).recycle();
|
||||
verify(response).updateBitmap(resizedBitmap);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче