Searched refs:mockDrawable (Results 1 – 7 of 7) sorted by relevance
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | DrawableTest.java | 85 Drawable mockDrawable = new MockDrawable(); in testClearColorFilter() local 86 mockDrawable.clearColorFilter(); in testClearColorFilter() 87 assertNull(mockDrawable.getColorFilter()); in testClearColorFilter() 90 mockDrawable.setColorFilter(cf); in testClearColorFilter() 91 assertEquals(cf, mockDrawable.getColorFilter()); in testClearColorFilter() 93 mockDrawable.clearColorFilter(); in testClearColorFilter() 94 assertNull(mockDrawable.getColorFilter()); in testClearColorFilter() 99 Drawable mockDrawable = new MockDrawable(); in testCopyBounds() local 100 Rect rect1 = mockDrawable.copyBounds(); in testCopyBounds() 102 mockDrawable.copyBounds(r1); in testCopyBounds() [all …]
|
D | DrawableWrapperTest.java | 168 Drawable mockDrawable = spy(new ColorDrawable(Color.BLUE)); in testDraw() local 169 doNothing().when(mockDrawable).draw(any()); in testDraw() 170 DrawableWrapper wrapper = new MyWrapper(mockDrawable); in testDraw() 173 verify(mockDrawable, times(1)).draw(any()); in testDraw() 175 reset(mockDrawable); in testDraw() 176 doNothing().when(mockDrawable).draw(any()); in testDraw() 178 verify(mockDrawable, times(1)).draw(any()); in testDraw() 186 MockDrawable mockDrawable = new MockDrawable(); in testGetChangingConfigurations() local 187 DrawableWrapper wrapper = new MyWrapper(mockDrawable); in testGetChangingConfigurations() 191 mockDrawable.setChangingConfigurations(CONTAINED_DRAWABLE_CONFIG); in testGetChangingConfigurations() [all …]
|
D | ScaleDrawableTest.java | 152 Drawable mockDrawable = spy(new ColorDrawable(Color.RED)); in testDraw() local 153 ScaleDrawable scaleDrawable = new ScaleDrawable(mockDrawable, Gravity.CENTER, 100, 200); in testDraw() 156 verify(mockDrawable, never()).draw(any()); in testDraw() 160 mockDrawable.setLevel(1); in testDraw() 162 verify(mockDrawable, times(1)).draw(any()); in testDraw() 164 reset(mockDrawable); in testDraw() 165 doNothing().when(mockDrawable).draw(any()); in testDraw() 167 verify(mockDrawable, times(1)).draw(any()); in testDraw() 175 Drawable mockDrawable = new ColorDrawable(Color.YELLOW); in testGetChangingConfigurations() local 176 ScaleDrawable scaleDrawable = new ScaleDrawable(mockDrawable, Gravity.CENTER, 100, 200); in testGetChangingConfigurations() [all …]
|
D | ClipDrawableTest.java | 80 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testDraw() local 81 mockDrawable.setLevel(5000); in testDraw() 82 ClipDrawable clipDrawable = new ClipDrawable(mockDrawable, in testDraw() 86 verify(mockDrawable, never()).draw(any()); in testDraw() 88 verify(mockDrawable, times(1)).draw(any()); in testDraw() 118 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testGetConstantState() local 119 doReturn(null).when(mockDrawable).getConstantState(); in testGetConstantState() 120 ClipDrawable clipDrawable = new ClipDrawable(mockDrawable, in testGetConstantState() 124 doReturn(new MockConstantState()).when(mockDrawable).getConstantState(); in testGetConstantState() 125 clipDrawable = new ClipDrawable(mockDrawable, Gravity.BOTTOM, ClipDrawable.HORIZONTAL); in testGetConstantState() [all …]
|
D | DrawableContainerTest.java | 231 Drawable mockDrawable = spy(new ColorDrawable(Color.BLACK)); in testSetAlpha() local 232 addAndSelectDrawable(mockDrawable); in testSetAlpha() 235 reset(mockDrawable); in testSetAlpha() 237 verify(mockDrawable, times(1)).setAlpha(1); in testSetAlpha() 240 reset(mockDrawable); in testSetAlpha() 242 verify(mockDrawable, never()).setAlpha(anyInt()); in testSetAlpha() 309 Drawable mockDrawable = spy(new ColorDrawable(Color.MAGENTA)); in testSetColorFilter() local 310 addAndSelectDrawable(mockDrawable); in testSetColorFilter() 313 reset(mockDrawable); in testSetColorFilter() 315 verify(mockDrawable, times(1)).setColorFilter(null); in testSetColorFilter() [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | CompoundButtonTest.java | 367 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testButtonTint() local 369 mCompoundButton.setButtonDrawable(mockDrawable); in testButtonTint() 371 verify(mockDrawable, never()).setTintList(any(ColorStateList.class)); in testButtonTint() 375 verify(mockDrawable, times(1)).setTintList(TestUtils.colorStateListOf(Color.WHITE)); in testButtonTint() 377 reset(mockDrawable); in testButtonTint() 379 mCompoundButton.setButtonDrawable(mockDrawable); in testButtonTint() 381 verify(mockDrawable, times(1)).setTintList(TestUtils.colorStateListOf(Color.WHITE)); in testButtonTint() 394 Drawable mockDrawable = spy(new ColorDrawable(Color.GREEN)); in testButtonTintBlendMode() local 396 mCompoundButton.setButtonDrawable(mockDrawable); in testButtonTintBlendMode() 398 verify(mockDrawable, never()).setTintList(any(ColorStateList.class)); in testButtonTintBlendMode() [all …]
|
D | ImageViewTest.java | 533 MockDrawable mockDrawable = new MockDrawable(); in testSetColorFilterPreservesDrawableProperties() local 534 mockDrawable.setAlpha(colorAlpha); in testSetColorFilterPreservesDrawableProperties() 535 mockDrawable.setXfermode(new PorterDuffXfermode(Mode.SRC_IN)); in testSetColorFilterPreservesDrawableProperties() 537 imageView.setImageDrawable(mockDrawable); in testSetColorFilterPreservesDrawableProperties() 540 assertEquals(colorAlpha, mockDrawable.getAlpha()); in testSetColorFilterPreservesDrawableProperties() 541 assertNotNull(mockDrawable.getXfermode()); in testSetColorFilterPreservesDrawableProperties() 549 MockDrawable mockDrawable = new MockDrawable(); in testSetColorFilterPreservesDrawablePropertiesTintBlendMode() local 550 mockDrawable.setAlpha(colorAlpha); in testSetColorFilterPreservesDrawablePropertiesTintBlendMode() 551 mockDrawable.setTintBlendMode(BlendMode.SRC_IN); in testSetColorFilterPreservesDrawablePropertiesTintBlendMode() 553 imageView.setImageDrawable(mockDrawable); in testSetColorFilterPreservesDrawablePropertiesTintBlendMode() [all …]
|