/frameworks/base/tests/NetworkSecurityConfigTest/src/android/security/net/config/ |
D | XmlConfigTests.java | 41 TestUtils.makeApplicationInfo()); in testEmptyConfigFile() 53 SSLContext context = TestUtils.getSSLContext(source); in testEmptyConfigFile() 54 TestUtils.assertConnectionSucceeds(context, "android.com", 443); in testEmptyConfigFile() 55 TestUtils.assertConnectionSucceeds(context, "developer.android.com", 443); in testEmptyConfigFile() 56 TestUtils.assertUrlConnectionSucceeds(context, "google.com", 443); in testEmptyConfigFile() 61 TestUtils.makeApplicationInfo()); in testEmptyAnchors() 72 SSLContext context = TestUtils.getSSLContext(source); in testEmptyAnchors() 73 TestUtils.assertConnectionFails(context, "android.com", 443); in testEmptyAnchors() 74 TestUtils.assertConnectionFails(context, "developer.android.com", 443); in testEmptyAnchors() 75 TestUtils.assertUrlConnectionFails(context, "google.com", 443); in testEmptyAnchors() [all …]
|
D | NetworkSecurityConfigTests.java | 123 SSLContext context = TestUtils.getSSLContext(testSource); in testEmptyConfig() 124 TestUtils.assertConnectionFails(context, "android.com", 443); in testEmptyConfig() 133 … SSLContext context = TestUtils.getSSLContext(new TestConfigSource(domainMap, defaultConfig)); in testEmptyPerNetworkSecurityConfig() 134 TestUtils.assertConnectionFails(context, "android.com", 443); in testEmptyPerNetworkSecurityConfig() 135 TestUtils.assertConnectionSucceeds(context, "google.com", 443); in testEmptyPerNetworkSecurityConfig() 151 = TestUtils.getSSLContext(new TestConfigSource(domainMap, getSystemStoreConfig())); in testBadPin() 152 TestUtils.assertConnectionFails(context, "android.com", 443); in testBadPin() 153 TestUtils.assertConnectionSucceeds(context, "google.com", 443); in testBadPin() 169 = TestUtils.getSSLContext(new TestConfigSource(domainMap, getEmptyConfig())); in testGoodPin() 170 TestUtils.assertConnectionSucceeds(context, "android.com", 443); in testGoodPin() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | RenderNodeTests.cpp | 42 auto child = TestUtils::createNode(0, 0, 200, 400, [](RenderProperties& props, Canvas& canvas) { in TEST() 45 auto parent = TestUtils::createNode(0, 0, 200, 400, in TEST() 50 TestUtils::syncHierarchyPropertiesAndDisplayList(parent); in TEST() 55 TestUtils::recordNode(*parent, [](Canvas& canvas) { in TEST() 62 TestUtils::syncHierarchyPropertiesAndDisplayList(parent); in TEST() 69 auto child = TestUtils::createNode(0, 0, 200, 400, [](RenderProperties& props, Canvas& canvas) { in TEST() 72 auto parent = TestUtils::createNode(0, 0, 200, 400, in TEST() 82 TestUtils::syncHierarchyPropertiesAndDisplayList(parent); in TEST() 89 TestUtils::recordNode(*parent, [](Canvas& canvas) { in TEST() 98 TestUtils::syncHierarchyPropertiesAndDisplayList(parent); in TEST() [all …]
|
D | WebViewFunctorManagerTests.cpp | 36 nullptr, TestUtils::createMockFunctorCallbacks(RenderMode::OpenGL_ES), in TEST() 40 TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) { in TEST() 43 auto& counts = TestUtils::countsForFunctor(functor); in TEST() 52 nullptr, TestUtils::createMockFunctorCallbacks(RenderMode::OpenGL_ES), in TEST() 59 TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) { in TEST() 62 auto& counts = TestUtils::countsForFunctor(functor); in TEST() 67 TestUtils::runOnRenderThreadUnmanaged([&](auto&) { in TEST() 74 TestUtils::runOnRenderThreadUnmanaged([&](auto&) { in TEST() 83 TestUtils::runOnRenderThreadUnmanaged([](renderthread::RenderThread&) { in TEST() 95 nullptr, TestUtils::createMockFunctorCallbacks(RenderMode::OpenGL_ES), in TEST() [all …]
|
D | SkiaPipelineTests.cpp | 46 auto redNode = TestUtils::createSkiaNode( in RENDERTHREAD_TEST() 59 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST() 62 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorRED); in RENDERTHREAD_TEST() 66 auto halfGreenNode = TestUtils::createSkiaNode( in RENDERTHREAD_TEST() 81 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST() 84 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in RENDERTHREAD_TEST() 85 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_TEST() 88 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), (unsigned int)SK_ColorTRANSPARENT); in RENDERTHREAD_TEST() 89 ASSERT_EQ(TestUtils::getColor(surface, 0, 1), SK_ColorGREEN); in RENDERTHREAD_TEST() 93 auto redNode = TestUtils::createSkiaNode( in RENDERTHREAD_TEST() [all …]
|
D | RenderNodeDrawableTests.cpp | 48 TestUtils::createNode(0, 0, 200, 400, [](RenderProperties& props, Canvas& canvas) { in TEST() 73 auto node = TestUtils::createSkiaNode( in drawOrderedNode() 85 auto node = TestUtils::createSkiaNode( in drawOrderedNode() 112 auto parent = TestUtils::createSkiaNode(0, 0, 100, 100, [](RenderProperties& props, in TEST() 149 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorBLUE); in TEST() 151 auto rootNode = TestUtils::createSkiaNode( in TEST() 164 ASSERT_EQ(SK_ColorRED, TestUtils::getColor(surface, 0, 0)); in TEST() 168 ASSERT_EQ(SK_ColorWHITE, TestUtils::getColor(surface, 0, 0)); in TEST() 172 ASSERT_EQ(SK_ColorRED, TestUtils::getColor(surface, 0, 0)); in TEST() 195 ASSERT_EQ(TestUtils::getColor(surface, 0, 0), SK_ColorWHITE); in TEST() [all …]
|
D | AutoBackendTextureReleaseTests.cpp | 47 EXPECT_EQ(1, TestUtils::getUsageCount(textureRelease)); in RENDERTHREAD_TEST() 52 EXPECT_EQ(1, TestUtils::getUsageCount(textureRelease)); in RENDERTHREAD_TEST() 65 EXPECT_EQ(1, TestUtils::getUsageCount(textureRelease)); in RENDERTHREAD_TEST() 69 EXPECT_EQ(2, TestUtils::getUsageCount(textureRelease)); in RENDERTHREAD_TEST()
|
D | SkiaDisplayListTests.cpp | 51 int functor1 = TestUtils::createMockFunctor(); in TEST() 103 int functor1 = TestUtils::createMockFunctor(); in TEST() 104 auto& counts = TestUtils::countsForFunctor(functor1); in TEST() 115 TestUtils::runOnRenderThread([&](auto&) { in TEST() 126 TestUtils::runOnRenderThread([](auto&) { in TEST() 167 auto rootNode = TestUtils::createNode(0, 0, 200, 400, nullptr); in RENDERTHREAD_TEST() 189 TestUtils::MockTreeObserver observer; in RENDERTHREAD_TEST() 226 auto rootNode = TestUtils::createNode(0, 0, 200, 400, nullptr); in RENDERTHREAD_TEST() 259 TestUtils::MockTreeObserver observer; in RENDERTHREAD_TEST() 283 TestUtils::MockTreeObserver observer; in RENDERTHREAD_TEST() [all …]
|
/frameworks/base/tools/app_metadata_bundles/src/test/java/com/android/asllib/marshallable/ |
D | AppInfoTest.java | 21 import com.android.asllib.testutils.TestUtils; 92 TestUtils.getElementsFromResource( in testMissingRequiredFields() 104 TestUtils.getElementsFromResource( in testMissingRequiredFields() 106 TestUtils.removeOdChildEleWithName(appInfoEle.get(0), reqField); in testMissingRequiredFields() 118 TestUtils.getElementsFromResource( in testMissingOptionalFields() 122 appInfo.toOdDomElements(TestUtils.document()); in testMissingOptionalFields() 127 TestUtils.getElementsFromResource( in testMissingOptionalFields() 129 TestUtils.removeOdChildEleWithName(ele.get(0), optField); in testMissingOptionalFields() 131 appInfo.toHrDomElements(TestUtils.document()); in testMissingOptionalFields() 136 TestUtils.testHrToOd( in testHrToOdAppInfo() [all …]
|
D | DeveloperInfoTest.java | 21 import com.android.asllib.testutils.TestUtils; 69 TestUtils.getElementsFromResource( in testMissingRequiredFields() 81 TestUtils.getElementsFromResource( in testMissingRequiredFields() 83 TestUtils.removeOdChildEleWithName(developerInfoEle.get(0), reqField); in testMissingRequiredFields() 96 TestUtils.getElementsFromResource( in testMissingOptionalFields() 101 developerInfo.toOdDomElements(TestUtils.document()); in testMissingOptionalFields() 106 TestUtils.getElementsFromResource( in testMissingOptionalFields() 108 TestUtils.removeOdChildEleWithName(developerInfoEle.get(0), optField); in testMissingOptionalFields() 111 developerInfo.toHrDomElements(TestUtils.document()); in testMissingOptionalFields() 116 TestUtils.testHrToOd( in testHrToOdDeveloperInfo() [all …]
|
D | SecurityLabelsTest.java | 20 import com.android.asllib.testutils.TestUtils; 63 TestUtils.getElementsFromResource( in testMissingOptionalFields() 67 securityLabels.toOdDomElements(TestUtils.document()); in testMissingOptionalFields() 71 TestUtils.getElementsFromResource( in testMissingOptionalFields() 73 TestUtils.removeOdChildEleWithName(ele.get(0), optField); in testMissingOptionalFields() 75 securityLabels.toHrDomElements(TestUtils.document()); in testMissingOptionalFields() 80 TestUtils.testHrToOd( in testHrToOdSecurityLabels() 81 TestUtils.document(), in testHrToOdSecurityLabels() 89 TestUtils.testOdToHr( in testOdToHrSecurityLabels() 90 TestUtils.document(), in testOdToHrSecurityLabels()
|
D | SystemAppSafetyLabelTest.java | 19 import com.android.asllib.testutils.TestUtils; 61 TestUtils.hrToOdExpectException( in hrToOdExpectException() 66 TestUtils.odToHrExpectException( in odToHrExpectException() 71 TestUtils.testHrToOd( in testHrToOdSystemAppSafetyLabel() 72 TestUtils.document(), in testHrToOdSystemAppSafetyLabel() 80 TestUtils.testOdToHr( in testOdToHrSystemAppSafetyLabel() 81 TestUtils.document(), in testOdToHrSystemAppSafetyLabel()
|
D | ThirdPartyVerificationTest.java | 19 import com.android.asllib.testutils.TestUtils; 61 TestUtils.hrToOdExpectException( in hrToOdExpectException() 66 TestUtils.odToHrExpectException( in odToHrExpectException() 71 TestUtils.testHrToOd( in testHrToOdThirdPartyVerification() 72 TestUtils.document(), in testHrToOdThirdPartyVerification() 80 TestUtils.testOdToHr( in testOdToHrThirdPartyVerification() 81 TestUtils.document(), in testOdToHrThirdPartyVerification()
|
D | SafetyLabelsTest.java | 19 import com.android.asllib.testutils.TestUtils; 84 TestUtils.hrToOdExpectException(new SafetyLabelsFactory(), SAFETY_LABELS_HR_PATH, fileName); in hrToOdExpectException() 88 TestUtils.odToHrExpectException(new SafetyLabelsFactory(), SAFETY_LABELS_OD_PATH, fileName); in odToHrExpectException() 92 TestUtils.testHrToOd( in testHrToOdSafetyLabels() 93 TestUtils.document(), in testHrToOdSafetyLabels() 101 TestUtils.testOdToHr( in testOdToHrSafetyLabels() 102 TestUtils.document(), in testOdToHrSafetyLabels()
|
D | AndroidSafetyLabelTest.java | 19 import com.android.asllib.testutils.TestUtils; 86 TestUtils.hrToOdExpectException( in hrToOdExpectException() 91 TestUtils.odToHrExpectException( in odToHrExpectException() 96 TestUtils.testHrToOd( in testHrToOdAndroidSafetyLabel() 97 TestUtils.document(), in testHrToOdAndroidSafetyLabel() 105 TestUtils.testOdToHr( in testOdToHrAndroidSafetyLabel() 106 TestUtils.document(), in testOdToHrAndroidSafetyLabel()
|
D | TransparencyInfoTest.java | 19 import com.android.asllib.testutils.TestUtils; 67 TestUtils.testHrToOd( in testHrToOdTransparencyInfo() 68 TestUtils.document(), in testHrToOdTransparencyInfo() 76 TestUtils.testOdToHr( in testOdToHrTransparencyInfo() 77 TestUtils.document(), in testOdToHrTransparencyInfo()
|
/frameworks/base/libs/hwui/tests/common/ |
D | TestUtils.cpp | 43 std::unordered_map<int, TestUtils::CallCounts> TestUtils::sMockFunctorCounts{}; 45 SkColor TestUtils::interpolateColor(float fraction, SkColor start, SkColor end) { in interpolateColor() 62 sp<DeferredLayerUpdater> TestUtils::createTextureLayerUpdater( in createTextureLayerUpdater() 76 sp<DeferredLayerUpdater> TestUtils::createTextureLayerUpdater( in createTextureLayerUpdater() 89 void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text, const Paint& paint, float x, in drawUtf8ToCanvas() 100 void TestUtils::drawUtf8ToCanvas(Canvas* canvas, const char* text, const Paint& paint, in drawUtf8ToCanvas() 107 void TestUtils::TestTask::run() { in run() 121 std::unique_ptr<uint16_t[]> TestUtils::asciiToUtf16(const char* str) { in asciiToUtf16() 130 SkColor TestUtils::getColor(const sk_sp<SkSurface>& surface, int x, int y) { in getColor() 169 SkRect TestUtils::getClipBounds(const SkCanvas* canvas) { in getClipBounds() [all …]
|
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/ |
D | AutomaticBrightnessControllerTest.java | 113 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, "Light Sensor"); in setUp() 226 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux1)); in testNoHysteresisAtMinBrightness() 240 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux2)); in testNoHysteresisAtMinBrightness() 269 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux1)); in testNoHysteresisAtMaxBrightness() 284 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, (int) lux2)); in testNoHysteresisAtMaxBrightness() 297 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 1000)); in testUserAddUserDataPoint() 319 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, currentLux)); in testRecalculateSplines() 356 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 123)); in testShortTermModelTimesOut() 370 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 1000)); in testShortTermModelTimesOut() 396 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 123)); in testShortTermModelDoesntTimeOut() [all …]
|
D | ScreenOffBrightnessSensorControllerTest.java | 66 mLightSensor = TestUtils.createSensor(Sensor.TYPE_LIGHT, "Light Sensor"); in setUp() 98 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 0)); in testBrightness() 104 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness() 111 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness() 118 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness() 125 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness() 131 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, sensorValue)); in testBrightness() 148 listener.onSensorChanged(TestUtils.createSensorEvent(mLightSensor, 1)); in testSensorValueValidTime()
|
/frameworks/base/core/tests/BroadcastRadioTests/src/com/android/server/broadcastradio/hal2/ |
D | ProgramInfoCacheTest.java | 53 private static final ProgramSelector TEST_AM_FM_SELECTOR = TestUtils.makeProgramSelector( 55 private static final RadioManager.ProgramInfo TEST_AM_FM_INFO = TestUtils.makeProgramInfo( 60 private static final ProgramSelector TEST_RDS_SELECTOR = TestUtils.makeProgramSelector( 62 private static final RadioManager.ProgramInfo TEST_RDS_INFO = TestUtils.makeProgramInfo( 65 private static final ProgramSelector TEST_HD_SELECTOR = TestUtils.makeProgramSelector( 79 private static final ProgramSelector TEST_DAB_SELECTOR = TestUtils.makeProgramSelector( 84 private static final RadioManager.ProgramInfo TEST_DAB_INFO = TestUtils.makeProgramInfo( 88 private static final ProgramSelector TEST_VENDOR_SELECTOR = TestUtils.makeProgramSelector( 92 private static final RadioManager.ProgramInfo TEST_VENDOR_INFO = TestUtils.makeProgramInfo( 109 chunk.modified.add(TestUtils.programInfoToHal(TEST_RDS_INFO)); in testUpdateFromHal() [all …]
|
D | TunerSessionHidlTest.java | 127 TestUtils.makeDefaultModuleProperties()); in setup() 141 mHalCurrentInfo = TestUtils.makeHalProgramInfo(halSel, SIGNAL_QUALITY); in setup() 164 TestUtils.makeHalFmSelector(/* freq= */ 97300); in setup() 345 ProgramSelector initialSel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]); in tune_withOneSession() 347 TestUtils.makeProgramInfo(initialSel, SIGNAL_QUALITY); in tune_withOneSession() 358 ProgramSelector initialSel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]); in tune_withMultipleSessions() 360 TestUtils.makeProgramInfo(initialSel, SIGNAL_QUALITY); in tune_withMultipleSessions() 373 ProgramSelector sel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]); in tune_withDeadTunerCallback_removesDeadSession() 407 ProgramSelector initialSel = TestUtils.makeFmSelector(AM_FM_FREQUENCY_LIST[1]); in tune_forNonCurrentUser_doesNotTune() 409 TestUtils.makeProgramInfo(initialSel, SIGNAL_QUALITY); in tune_forNonCurrentUser_doesNotTune() [all …]
|
/frameworks/base/packages/SystemUI/accessibility/accessibilitymenu/tests/src/com/android/systemui/accessibility/accessibilitymenu/tests/ |
D | AccessibilityMenuServiceTest.java | 61 import com.android.compatibility.common.util.TestUtils; 129 TestUtils.waitUntil("Failed to disable all services", in classSetup() 139 TestUtils.waitUntil("Failed to enable service", in classSetup() 224 TestUtils.waitUntil("Timed out before menu could close.", in closeMenu() 271 TestUtils.waitUntil("Could not change to minimum brightness", in testAdjustBrightness() 280 TestUtils.waitUntil("Did not detect an increase in brightness.", in testAdjustBrightness() 285 TestUtils.waitUntil("Could not change to maximum brightness", in testAdjustBrightness() 294 TestUtils.waitUntil("Did not detect a decrease in brightness.", in testAdjustBrightness() 320 TestUtils.waitUntil("Could not change audio stream to minimum volume.", in testAdjustVolume() 324 TestUtils.waitUntil("Did not detect an increase in volume.", in testAdjustVolume() [all …]
|
/frameworks/base/tools/app_metadata_bundles/src/test/java/com/android/asllib/testutils/ |
D | TestUtils.java | 52 public class TestUtils { class 58 TestUtils.class.getClassLoader().getResourceAsStream(filePath.toString()); in readStrFromResource() 140 TestUtils.getElementsFromResource(Paths.get(hrFolderPath, fileName))); in hrToOdExpectException() 151 TestUtils.getElementsFromResource(Paths.get(odFolderPath, fileName))); in odToHrExpectException() 189 TestUtils.getElementsFromResource( in testFormatToFormat() 192 TestUtils.getElementsFromResource( in testFormatToFormat() 202 Element root = doc.createElement(TestUtils.HOLDER_TAG_NAME); in testFormatToFormat() 208 String converted = TestUtils.getFormattedXml(TestUtils.docToStr(doc, true), true); in testFormatToFormat() 211 TestUtils.getFormattedXml( in testFormatToFormat() 212 TestUtils.readStrFromResource(Paths.get(outFolderPath, fileName)), true); in testFormatToFormat()
|
/frameworks/opt/net/wifi/libs/WifiTrackerLib/tests/src/com/android/wifitrackerlib/ |
D | StandardWifiEntryTest.java | 37 import static com.android.wifitrackerlib.TestUtils.buildScanResult; 130 when(mMockWifiManager.calculateSignalLevel(TestUtils.GOOD_RSSI)) in setUp() 131 .thenReturn(TestUtils.GOOD_LEVEL); in setUp() 132 when(mMockWifiManager.calculateSignalLevel(TestUtils.OKAY_RSSI)) in setUp() 133 .thenReturn(TestUtils.OKAY_LEVEL); in setUp() 134 when(mMockWifiManager.calculateSignalLevel(TestUtils.BAD_RSSI)) in setUp() 135 .thenReturn(TestUtils.BAD_LEVEL); in setUp() 159 buildScanResult("ssid0", "bssid0", 0, TestUtils.GOOD_RSSI), in testConstructor_mismatchedSsids_throwsException() 160 buildScanResult("ssid1", "bssid1", 0, TestUtils.GOOD_RSSI)), in testConstructor_mismatchedSsids_throwsException() 177 buildScanResult("ssid", "bssid0", 0, TestUtils.GOOD_RSSI), in testConstructor_scanResults_setsBestLevel() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/accessibility/floatingmenu/ |
D | RadiiAnimatorTest.java | 28 import com.android.systemui.accessibility.utils.TestUtils; 77 TestUtils.waitForCondition(mAnimationStarted::get, "Animation did not start."); in skipAnimation_updatesToEnd() 78 TestUtils.waitForCondition(() -> Arrays.equals(radiiAnimator.evaluate(0.0f), startRadii) in skipAnimation_updatesToEnd() 82 TestUtils.waitForCondition(mAnimationStopped::get, "Animation did not stop."); in skipAnimation_updatesToEnd() 116 TestUtils.waitForCondition(mAnimationStarted::get, "Animation did not start."); in playAndSkipAnimation() 118 TestUtils.waitForCondition(mAnimationStopped::get, "Animation did not stop."); in playAndSkipAnimation()
|