/cts/tests/tests/graphics/src/android/graphics/drawable/cts/ |
D | InsetDrawableTest.java | 330 assertEquals((int)(mPassDrawable.getIntrinsicWidth() / (1 - 2 * inset)), in testIsBoundsAndIntrinsicSizeInverse() 331 insetDrawable.getIntrinsicWidth()); in testIsBoundsAndIntrinsicSizeInverse() 335 Rect r = new Rect(0, 0, insetDrawable.getIntrinsicWidth(), in testIsBoundsAndIntrinsicSizeInverse() 340 assertEquals((int)(insetDrawable.getIntrinsicWidth() * inset), r.left); in testIsBoundsAndIntrinsicSizeInverse() 342 assertEquals(insetDrawable.getIntrinsicWidth() in testIsBoundsAndIntrinsicSizeInverse() 343 - (int)((inset) * insetDrawable.getIntrinsicWidth()), r.right); in testIsBoundsAndIntrinsicSizeInverse() 348 assertEquals(r.width(), mPassDrawable.getIntrinsicWidth(), 1); in testIsBoundsAndIntrinsicSizeInverse() 361 int expected = mPassDrawable.getIntrinsicWidth(); in testGetIntrinsicWidth() 362 assertEquals(expected, mInsetDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 367 expected = mPassDrawable.getIntrinsicWidth(); in testGetIntrinsicWidth() [all …]
|
D | LayerDrawableTest.java | 309 doReturn(10).when(firstLayer).getIntrinsicWidth(); in testSetLayerInset() 312 doReturn(-1).when(secondLayer).getIntrinsicWidth(); in testSetLayerInset() 324 assertEquals(layerDrawable.getDrawable(0).getIntrinsicWidth() + left + right, in testSetLayerInset() 325 layerDrawable.getIntrinsicWidth()); in testSetLayerInset() 332 assertEquals(layerDrawable.getDrawable(0).getIntrinsicWidth() + left + right, in testSetLayerInset() 333 layerDrawable.getIntrinsicWidth()); in testSetLayerInset() 481 assertEquals(34, layerDrawable.getIntrinsicWidth()); in testAccessPaddingMode() 488 assertEquals(30, layerDrawable.getIntrinsicWidth()); in testAccessPaddingMode() 790 doReturn(10).when(largeMockDrawable).getIntrinsicWidth(); in testGetIntrinsicWidth() 793 doReturn(1).when(smallMockDrawable).getIntrinsicWidth(); in testGetIntrinsicWidth() [all …]
|
D | GradientDrawableTest.java | 241 assertEquals(width, gradientDrawable.getIntrinsicWidth()); in verifySetSize() 609 assertEquals(6, gradientDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 612 assertEquals(-10, gradientDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 642 assertEquals(10, d1.getIntrinsicWidth()); in testMutate() 644 assertEquals(10, d2.getIntrinsicWidth()); in testMutate() 646 assertEquals(10, d3.getIntrinsicWidth()); in testMutate() 651 assertEquals(20, d1.getIntrinsicWidth()); in testMutate() 653 assertEquals(10, d2.getIntrinsicWidth()); in testMutate() 655 assertEquals(10, d3.getIntrinsicWidth()); in testMutate() 659 assertEquals(20, d1.getIntrinsicWidth()); in testMutate() [all …]
|
D | StateListDrawableTest.java | 215 final int tempWidth0 = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityTestForDrawableInner() 217 final int tempWidth1 = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityTestForDrawableInner() 239 assertEquals(Math.round(origWidth0 * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner() 241 assertEquals(Math.round(origWidth1 * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner() 249 assertEquals(origWidth0 * 2, doubleDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner() 251 assertEquals(origWidth1 * 2, doubleDrawable.getIntrinsicWidth(), 1); in verifyPreloadDensityTestForDrawableInner() 258 assertEquals(origWidth0, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityTestForDrawableInner() 260 assertEquals(origWidth1, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityTestForDrawableInner()
|
D | NinePatchDrawableTest.java | 282 assertEquals(bmp.getWidth(), mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 283 assertEquals(5, mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 287 assertEquals(bmp.getWidth(), mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 288 assertEquals(9, mNinePatchDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth() 388 assertEquals(targetWidth, ninePatchDrawable.getIntrinsicWidth()); in testInflate() 401 assertTrue(sourceWidth != ninePatchDrawable.getIntrinsicWidth()); in testInflate() 465 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifySetTargetDensityInner() 479 assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth()); in verifySetTargetDensityInner() 496 assertEquals(origWidth, scaledDrawable.getIntrinsicWidth()); in verifySetTargetDensityInner() 550 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner() [all …]
|
D | AnimationDrawableTest.java | 204 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame() 209 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame() 214 assertEquals(drawable.getIntrinsicWidth(), frame.getIntrinsicWidth()); in testGetFrame()
|
D | PictureDrawableTest.java | 76 assertEquals(-1, pictureDrawable.getIntrinsicWidth()); in testGetIntrinsicSize() 83 assertEquals(99, pictureDrawable.getIntrinsicWidth()); in testGetIntrinsicSize()
|
D | VectorDrawableTest.java | 445 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner() 454 assertEquals(Math.round(origWidth * approxHalf), halfDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 460 assertEquals(origWidth * 2, doubleDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 466 assertEquals(origWidth, origDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 471 assertEquals(origWidth, halfDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 473 assertEquals(origWidth, doubleDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner()
|
D | AnimatedStateListDrawableTest.java | 196 final int width = cs.getChild(i).getIntrinsicWidth(); in runPreloadDensityTestForDrawableInner() 214 assertEquals(Math.round(origWidth[i] * 0.5f), halfDrawable.getIntrinsicWidth(), 1); in runPreloadDensityTestForDrawableInner() 223 assertEquals(origWidth[i] * 2, doubleDrawable.getIntrinsicWidth(), 1); in runPreloadDensityTestForDrawableInner() 232 assertEquals(origWidth[i], origDrawable.getIntrinsicWidth()); in runPreloadDensityTestForDrawableInner()
|
D | ShapeDrawableTest.java | 130 assertEquals(0, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth() 133 assertEquals(10, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth() 136 assertEquals(Integer.MIN_VALUE, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth() 139 assertEquals(Integer.MAX_VALUE, shapeDrawable.getIntrinsicWidth()); in testAccessIntrinsicWidth() 267 assertEquals(42, shapeDrawable.getIntrinsicWidth()); in testInflate()
|
D | DrawableTest.java | 397 assertEquals(densityAdjustedSize, drawable.getIntrinsicWidth()); in testImageIntrinsicScaledForDensity() 412 assertEquals(densityAdjustedSize, drawable.getIntrinsicWidth()); in testImageIntrinsicScaledForDensityWithBitmapOptions() 424 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXml() 437 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlThemed() 452 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlInner() 469 assertEquals(expected.getIntrinsicWidth(), drawable.getIntrinsicWidth()); in testCreateFromXmlInnerThemed() 533 assertEquals(-1, mockDrawable.getIntrinsicWidth()); in testGetIntrinsicWidth()
|
D | AnimatedImageDrawableTest.java | 152 assertEquals(WIDTH, drawable.getIntrinsicWidth()); in testDecodeAnimatedImageDrawable() 296 Bitmap bm = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), in testLifeCycleSoftware() 473 Bitmap actual = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testColorFilter() 503 assertEquals(width, exifAnimation.getIntrinsicWidth()); in testExif() 535 Bitmap expected = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testPostProcess() 542 Rect r = rectCreator.apply(drawable.getIntrinsicWidth(), in testPostProcess() 581 Bitmap actual = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in testPostProcess() 669 Bitmap test = Bitmap.createBitmap(drawable.getIntrinsicWidth(), in drawAndCompare() 681 final int width = drawable.getIntrinsicWidth(); in testAutoMirroredDrawing()
|
D | BitmapDrawableTest.java | 145 int intrinsicWidth = bitmapDrawable.getIntrinsicWidth(); in testBitmapDrawableOpticalInset() 383 assertEquals(-1, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize() 389 assertEquals(200, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize() 395 assertEquals(48, bitmapDrawable.getIntrinsicWidth()); in testGetIntrinsicSize() 420 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity() 434 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity() 449 assertEquals(targetWidth, bitmapDrawable.getIntrinsicWidth()); in testSetTargetDensity()
|
D | RotateDrawableTest.java | 265 assertEquals(drawable.getIntrinsicWidth(), mRotateDrawable.getIntrinsicWidth()); in testGetIntrinsicWidthAndHeight() 275 assertEquals(drawable.getIntrinsicWidth(), rotateDrawable.getIntrinsicWidth()); in testGetIntrinsicWidthAndHeight()
|
D | VectorDrawableSizeTest.java | 72 assertEquals(Math.round(mDpSize * densityDpi / 160f), drawable.getIntrinsicWidth()); in testVectorDrawableSize()
|
D | DrawableContainerStateTest.java | 207 doReturn(0).when(dr0).getIntrinsicWidth(); in testConstantHeightsAndWidths() 219 doReturn(4).when(dr1).getIntrinsicWidth(); in testConstantHeightsAndWidths() 231 doReturn(5).when(dr2).getIntrinsicWidth(); in testConstantHeightsAndWidths()
|
/cts/tests/tests/widget/src/android/widget/cts/ |
D | CheckedTextViewTest.java | 214 assertEquals(firstDrawable.getIntrinsicWidth(), mCheckedTextView.getPaddingRight()); 230 assertEquals(secondDrawable.getIntrinsicWidth() + basePaddingRight, 253 assertEquals(firstDrawable.getIntrinsicWidth() + basePaddingRight, 260 assertEquals(firstDrawable.getIntrinsicWidth() + basePaddingRight, 267 assertEquals(secondDrawable.getIntrinsicWidth() + basePaddingRight, 333 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, 345 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, 356 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, 382 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, in testCheckMarkTintBlendMode() 394 checkMark.getIntrinsicWidth(), checkMark.getIntrinsicHeight(), false, in testCheckMarkTintBlendMode() [all …]
|
D | ImageButtonTest.java | 82 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource() 88 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource() 94 imageButtonDrawable.getIntrinsicWidth(), imageButtonDrawable.getIntrinsicHeight(), in testImageSource()
|
D | ToolbarTest.java | 219 toolbarOverflowIcon.getIntrinsicWidth(), toolbarOverflowIcon.getIntrinsicHeight(), in testMenuOverflowIcon() 261 toolbarNavigationIcon.getIntrinsicWidth(), in testNavigationConfiguration() 269 toolbarNavigationIcon.getIntrinsicWidth(), in testNavigationConfiguration() 297 toolbarCollapseIcon.getIntrinsicWidth(), in testCollapseConfiguration() 305 toolbarCollapseIcon.getIntrinsicWidth(), in testCollapseConfiguration() 325 toolbarLogo.getIntrinsicWidth(), in testLogoConfiguration() 333 toolbarLogo.getIntrinsicWidth(), in testLogoConfiguration()
|
D | FrameLayoutTest.java | 105 WidgetTestUtils.assertScaledPixels(48, foreground.getIntrinsicWidth(), mActivity); in testSetForegroundGravity() 107 assertTrue(mFrameLayout.getWidth() > foreground.getIntrinsicWidth()); in testSetForegroundGravity() 124 WidgetTestUtils.assertScaledPixels(48, newForeground.getIntrinsicWidth(), mActivity); in testSetForegroundGravity() 126 assertTrue(mFrameLayout.getWidth() > foreground.getIntrinsicWidth()); in testSetForegroundGravity() 137 assertEquals(foreground.getIntrinsicWidth(), rect2.right - rect2.left); in testSetForegroundGravity()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | BitmapDrawableTest.java | 92 final int origWidth = preloadedDrawable.getIntrinsicWidth(); in verifyPreloadDensityInner() 108 assertEquals(Math.round(origWidth * scale), scaledDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 123 assertEquals(origWidth, scaledDrawable.getIntrinsicWidth()); in verifyPreloadDensityInner() 130 final Rect drBounds = new Rect(0, 0, dr.getIntrinsicWidth(), dr.getIntrinsicHeight()); in runTest()
|
/cts/tests/tests/transition/src/android/transition/cts/ |
D | ChangeImageTransformTest.java | 136 int imageWidth = mImage.getIntrinsicWidth(); in centerMatrix() 150 int imageWidth = mImage.getIntrinsicWidth(); in fitXYMatrix() 164 int imageWidth = mImage.getIntrinsicWidth(); in centerCropMatrix() 186 int imageWidth = mImage.getIntrinsicWidth(); in fitCenterMatrix() 208 int imageWidth = mImage.getIntrinsicWidth(); in fitStartMatrix() 224 int imageWidth = mImage.getIntrinsicWidth(); in fitEndMatrix()
|
/cts/hostsidetests/shortcuts/deviceside/common/src/android/content/pm/cts/shortcut/device/common/ |
D | ShortcutManagerDeviceTestBase.java | 116 assertEquals(expected.getIntrinsicWidth(), actual.getIntrinsicWidth()); in assertIconDimensions()
|
/cts/tests/app/src/android/app/cts/ |
D | LauncherActivity_IconResizerTest.java | 54 assertTrue(thumbNail.getIntrinsicWidth() > 0); in testIconResizer()
|
/cts/tests/tests/content/src/android/content/res/cts/ |
D | ResourcesTest.java | 331 assertEquals(212 * targetDensity / defaultDensity, draw.getIntrinsicWidth(), 1); in testGetDrawable() 413 assertEquals(300, ldpi.getIntrinsicWidth()); in testGetDrawableForDensity() 417 assertEquals(200, mdpi.getIntrinsicWidth()); in testGetDrawableForDensity() 421 assertEquals(100, hdpi.getIntrinsicWidth()); in testGetDrawableForDensity() 432 assertEquals(defaultDrawable.getIntrinsicWidth(), densityDrawable.getIntrinsicWidth()); in testGetDrawableForDensityWithZeroDensityIsSameAsGetDrawable() 445 assertEquals(300, ldpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable() 450 assertEquals(200, mdpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable() 455 assertEquals(100, hdpi.getIntrinsicWidth()); in testGetDrawableForDensityWithAdaptiveIconDrawable()
|