Home
last modified time | relevance | path

Searched refs:testFile (Results 1 – 25 of 73) sorted by relevance

123

/cts/tests/tests/os/src/android/os/cts/
DFileObserverTest.java47 File testFile = new File(dir, TEST_FILE); in helpSetUp() local
48 testFile.createNewFile(); in helpSetUp()
78 File testFile = new File(dir, TEST_FILE); in helpTearDown() local
82 if (testFile.exists()) { in helpTearDown()
83 testFile.delete(); in helpTearDown()
146 File testFile = new File(dir, TEST_FILE); in helpTestFileObserver() local
151 fileObserver = new MockFileObserver(testFile.getParentFile()); in helpTestFileObserver()
155 verifyTriggeredEventsOnFile(fileObserver, testFile, isEmulated); in helpTestFileObserver()
160 testFile.delete(); // delete in helpTestFileObserver()
165 assertEventsContains(testFile, expected, moveEvents); in helpTestFileObserver()
[all …]
/cts/hostsidetests/scopedstorage/device/src/android/scopedstorage/cts/device/
DStorageOtherAndOwnedFilesTest.java192 File testFile = new File(getDcimDir(), "testFile" + System.nanoTime() + ".jpg"); in testRevokeOwnershipWhenOwnedPhotosEnabled() local
193 testFile.createNewFile(); in testRevokeOwnershipWhenOwnedPhotosEnabled()
205 modifyReadAccess(testFile, THIS_PACKAGE_NAME, REVOKE); in testRevokeOwnershipWhenOwnedPhotosEnabled()
215 modifyReadAccess(testFile, THIS_PACKAGE_NAME, GRANT); in testRevokeOwnershipWhenOwnedPhotosEnabled()
221 modifyReadAccess(testFile, THIS_PACKAGE_NAME, REVOKE); in testRevokeOwnershipWhenOwnedPhotosEnabled()
222 executeShellCommand("rm " + testFile); in testRevokeOwnershipWhenOwnedPhotosEnabled()
231 File testFile = new File(getDcimDir(), "testFile" + System.nanoTime() + ".jpg"); in testRevokeOwnershipWhenOwnedPhotosDisabled() local
232 testFile.createNewFile(); in testRevokeOwnershipWhenOwnedPhotosDisabled()
245 modifyReadAccess(testFile, THIS_PACKAGE_NAME, REVOKE); in testRevokeOwnershipWhenOwnedPhotosDisabled()
251 executeShellCommand("rm " + testFile); in testRevokeOwnershipWhenOwnedPhotosDisabled()
[all …]
/cts/tests/tests/content/src/android/content/cts/
DReadableUriExtraToClipDataTest.java63 File testFile = new File(getContext().getFilesDir() + File.separator + fileName); in setUp() local
64 writeTestInputToFile(testFile); in setUp()
65 mTestFiles.add(testFile); in setUp()
66 mTestFileUris.add(Uri.fromFile(testFile)); in setUp()
72 for (File testFile : mTestFiles) { in tearDown()
73 if (testFile.exists()) { in tearDown()
74 assertTrue(testFile.delete()); in tearDown()
/cts/libs/install/src/android/cts/install/lib/host/
DInstallUtilsHost.java193 File testFile = null; in getTestFile() local
197 testFile = searchTestFile(testCasesDir, testFileName); in getTestFile()
198 if (testFile != null) { in getTestFile()
199 return testFile; in getTestFile()
206 testFile = searchTestFile(hostLinkedDir, testFileName); in getTestFile()
208 if (testFile != null) { in getTestFile()
209 return testFile; in getTestFile()
226 File testFile = FileUtil.findFile(baseSearchFile, testFileName); in searchTestFile() local
227 if (testFile != null && testFile.isFile()) { in searchTestFile()
228 return testFile; in searchTestFile()
/cts/tests/backup/app/src/android/backup/app/
DKeyValueBackupAgent.java48 File testFile = new File(getFilesDir(), MainActivity.FILE_NAME); in onBackup() local
49 Log.d(MainActivity.TAG, "Writing " + testFile.length()); in onBackup()
51 data.writeEntityHeader(MainActivity.FILE_NAME, (int) testFile.length()); in onBackup()
53 try (FileInputStream input = new FileInputStream(testFile)) { in onBackup()
/cts/hostsidetests/appsecurity/test-apps/ReadExternalStorageApp/src/com/android/cts/readexternalstorageapp/
DReadMultiViewTest.java46 final File testFile = new File(ourTestDir, "test.probe"); in testRWAccess() local
48 assertFileReadWriteAccess(testFile); in testRWAccess()
51 assertEquals(Os.getuid(), Os.stat(testFile.getAbsolutePath()).st_uid); in testRWAccess()
/cts/tests/tests/mediaediting/src/android/media/mediaediting/cts/
DTransformHdrToSdrToneMapTest.java79 private final String testFile; field in TransformHdrToSdrToneMapTest
82 public TransformHdrToSdrToneMapTest(String mediaType, String testFile, String testId) { in TransformHdrToSdrToneMapTest() argument
84 this.testFile = testFile; in TransformHdrToSdrToneMapTest()
150 Preconditions.assertTestFileExists(MEDIA_DIR + testFile);
155 /* inputFormat= */ MediaEditingUtil.getFormatForTestFile(testFile),
156 /* outputFormat= */ MediaEditingUtil.getFormatForTestFile(testFile)
166 MediaItem.fromUri(Uri.parse(MEDIA_DIR + testFile))).build())
DTranscodeQualityTest.java57 private final String testFile; field in TranscodeQualityTest
62 float frameRate, String testFile, boolean isWithinCddRequirements, String testId) { in TranscodeQualityTest() argument
68 this.testFile = testFile; in TranscodeQualityTest()
171 Preconditions.assertTestFileExists(MEDIA_DIR + testFile); in transcodeTest()
186 MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MEDIA_DIR + testFile)); in transcodeTest()
DTransformReverseTransformIdentityTest.java72 private final String testFile; field in TransformReverseTransformIdentityTest
80 String testFile, int inpWidth, int inpHeight, int outWidth, int outHeight, String testId) { in TransformReverseTransformIdentityTest() argument
83 this.testFile = testFile; in TransformReverseTransformIdentityTest()
199 Preconditions.assertTestFileExists(MEDIA_DIR + testFile); in transformTest()
221 MediaItem.fromUri(Uri.parse(MEDIA_DIR + testFile))).setEffects(videoEffects) in transformTest()
244 checkNotNull(Uri.parse(MEDIA_DIR + testFile)).toString(), in transformTest()
DTransformVideoAspectRatio.java62 private final String testFile; field in TransformVideoAspectRatio
66 float requestedAspectRatio, String testFile, String testId) { in TransformVideoAspectRatio() argument
71 this.testFile = testFile; in TransformVideoAspectRatio()
193 Preconditions.assertTestFileExists(MEDIA_DIR + testFile); in transcodeTest()
200 MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MEDIA_DIR + testFile)); in transcodeTest()
DVideoResolutionTest.java62 private final String testFile; field in VideoResolutionTest
69 public VideoResolutionTest(String mediaType, String testFile, int inpWidth, int inpHeight, in VideoResolutionTest() argument
72 this.testFile = testFile; in VideoResolutionTest()
257 Preconditions.assertTestFileExists(MEDIA_DIR + testFile); in transformTest()
263 MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MEDIA_DIR + testFile)); in transformTest()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPreconditions.java36 File testFile = new File(pathName); in assertTestFileExists() local
37 Assert.assertTrue("Test Setup Error, missing file: " + pathName, testFile.exists()); in assertTestFileExists()
/cts/tests/mediapc/src/android/mediapc/cts/
DMultiDecoderPairPerfTest.java255 String testFile = m1080pTestFiles.get(mSecondPair.first); in testCodec() local
256 testList.add(new Decode(mSecondPair.first, testFile, mSecondPair.second, in testCodec()
260 String testFile = m1080pTestFiles.get(mFirstPair.first); in testCodec() local
261 testList.add(new Decode(mFirstPair.first, testFile, mFirstPair.second, in testCodec()
269 String testFile = isSecure ? widevineTestFiles.get(mFirstPair.first) : in testCodec() local
272 + "mediaType: " + mFirstPair.first, testFile != null); in testCodec()
273 testList.add(new Decode(mFirstPair.first, testFile, mFirstPair.second, mIsAsync, in testCodec()
278 String testFile = isSecure ? widevineTestFiles.get(mSecondPair.first) : in testCodec() local
280 if (height > 1080 && noneSecure) testFile = m1080pTestFiles.get(mSecondPair.first); in testCodec()
282 + "mediaType: " + mSecondPair.first, testFile != null); in testCodec()
[all …]
/cts/hostsidetests/dumpsys/apps/storagedapp/src/com/android/server/cts/storaged/
DSimpleIOActivity.java31 File testFile = new File(getFilesDir(), "StoragedTest_Temp_FG"); in onStart() local
34 FileWriter w = new FileWriter(testFile); in onStart()
DSimpleIOService.java78 File testFile = new File(getFilesDir(), "StoragedTest_Temp_BG"); in handleMessage() local
81 FileWriter w = new FileWriter(testFile); in handleMessage()
/cts/tests/ondeviceintelligence/src/android/ondeviceintelligence/cts/
DCtsIntelligenceService.java100 File testFile = new File(getFilesDir(), TEST_FILE_NAME); in onInferenceServiceConnected() local
102 populateTestContent(testFile); in onInferenceServiceConnected()
136 File testFile = new File(getFilesDir(), TEST_FILE_NAME); in createAndPopulateTestFile() local
137 populateTestContent(testFile); in createAndPopulateTestFile()
138 try (ParcelFileDescriptor pfd = ParcelFileDescriptor.open(testFile, in createAndPopulateTestFile()
141 fileDescriptorMap.put(testFile.getName(), pfd); in createAndPopulateTestFile()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DCallComposerTest.java105 Path testFile = mContext.getFilesDir().toPath().resolve(TEST_FILE_NAME); in testUploadPictureWithFile() local
107 Files.write(testFile, imageData); in testUploadPictureWithFile()
109 UUID handle = pictureUploadHelper(testFile, null, -1); in testUploadPictureWithFile()
134 Path testFile = mContext.getFilesDir().toPath().resolve(TEST_FILE_NAME); in testExcessivelyLargePictureAsFile() local
135 Files.write(testFile, paddedData); in testExcessivelyLargePictureAsFile()
137 pictureUploadHelper(testFile, null, in testExcessivelyLargePictureAsFile()
/cts/tests/framework/base/windowmanager/src/android/server/wm/intent/
DIntentTests.java138 for (String testFile : testFiles) { in readAllFromAssets()
140 new BufferedInputStream(assets.open(testFile))))) { in readAllFromAssets()
145 new JSONObject(jsonData), TABLE, testFile); in readAllFromAssets()
/cts/tests/media/jni/
DNativeCodecDecoderTestCommon.cpp65 bool testSimpleDecode(const char* decoder, const char* testFile, const char* refFile,
67 bool testFlush(const char* decoder, const char* testFile, int colorFormat);
68 bool testOnlyEos(const char* decoder, const char* testFile, int colorFormat);
69 bool testSimpleDecodeQueueCSD(const char* decoder, const char* testFile, int colorFormat);
356 bool CodecDecoderTest::testSimpleDecode(const char* decoder, const char* testFile, in testSimpleDecode() argument
359 if (!setUpExtractor(testFile, (mWindow == nullptr) ? colorFormat : -1)) return false; in testSimpleDecode()
426 testFile, rmsError, errMargin, currError)) in testSimpleDecode()
431 bool CodecDecoderTest::testFlush(const char* decoder, const char* testFile, int colorFormat) { in testFlush() argument
432 if (!setUpExtractor(testFile, colorFormat)) return false; in testFlush()
447 StringFormat("decodeToMemory failed for file: %s codec: %s", testFile, decoder)) in testFlush()
[all …]
/cts/hostsidetests/backup/includeexcludeapp/src/android/cts/backup/includeexcludeapp/
DDataExtractionRulesApplicabilityTest.java63 File testFile = new File(mContext.getFilesDir(), fileName); in createFiles() local
65 try (FileWriter fileWriter = new FileWriter(testFile)) { in createFiles()
/cts/tests/media/common/src/android/mediav2/common/cts/
DCompareStreams.java106 public CompareStreams(RawResource refYuv, String testMediaType, String testFile, in CompareStreams() argument
108 super(findDecoderForStream(testMediaType, testFile), testMediaType, testFile, LOG_TAG); in CompareStreams() local
128 String testFile, boolean allowRefResize, boolean allowRefLoopBack) throws IOException { in CompareStreams() argument
129 this(new DecodeStreamToYuv(refMediaType, refFile).getDecodedYuv(), testMediaType, testFile, in CompareStreams()
134 public CompareStreams(RawResource refYuv, String testMediaType, String testFile, in CompareStreams() argument
137 super(findDecoderForStream(testMediaType, testFile), testMediaType, testFile, LOG_TAG); in CompareStreams() local
/cts/hostsidetests/os/src/android/os/cts/
DProcfsHostTests.java92 testFile(PROC_STAT_PATH, PROC_STAT_READ_COMMAND, PROC_STAT_PATTERN); in testProcStat()
102 testFile("/proc/" + mTestAppPid + "/stat", "cat ", PID_TID_STAT_PATTERN); in testProcPidStat()
142 private void testFile(String absolutePath, String readCommand, Pattern pattern) throws Exception { in testFile() method in ProcfsHostTests
/cts/tests/video/src/android/video/cts/
DCodecDecoderPerformanceTest.java43 public CodecDecoderPerformanceTest(String decoderName, String testFile, int keyPriority, in CodecDecoderPerformanceTest() argument
45 super(decoderName, testFile, keyPriority, scalingFactor, scalingFactorMode); in CodecDecoderPerformanceTest()
DCodecDecoderPerformanceTestBase.java43 public CodecDecoderPerformanceTestBase(String decoderName, String testFile, int keyPriority, in CodecDecoderPerformanceTestBase() argument
45 super(decoderName, testFile, keyPriority, scalingFactor, scalingFactorMode); in CodecDecoderPerformanceTestBase()
/cts/tests/videocodec/src/android/videocodec/cts/
DVideoDecoderValidationTest.java60 public VideoDecoderValidationTest(String decoder, String mediaType, String testFile, in VideoDecoderValidationTest() argument
62 super(decoder, mediaType, MEDIA_DIR + testFile, allTestParams); in VideoDecoderValidationTest()

123