/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/ |
D | MSSIMMatcherTest.kt | 33 val first = loadBitmap("round_rect_gray") in performDiff_sameBitmaps() constant 35 val filter = BooleanArray(first.width * first.height) { true } in performDiff_sameBitmaps() 40 first.toIntArray(), in performDiff_sameBitmaps() 42 first.width, in performDiff_sameBitmaps() 43 first.height, in performDiff_sameBitmaps() 53 val first = loadBitmap("checkbox_checked") in performDiff_noPixelsCompared() constant 55 val filter = BooleanArray(first.width * first.height) { false } in performDiff_noPixelsCompared() 60 first.toIntArray(), in performDiff_noPixelsCompared() 62 first.width, in performDiff_noPixelsCompared() 63 first.height, in performDiff_noPixelsCompared() [all …]
|
D | PixelPerfectMatcherTest.kt | 34 val first = loadBitmap("round_rect_gray") in performDiff_sameBitmaps() constant 40 first.toIntArray(), in performDiff_sameBitmaps() 42 first.width, in performDiff_sameBitmaps() 43 first.height in performDiff_sameBitmaps() 51 val first = loadBitmap("round_rect_gray") in performDiff_sameSize_partialCompare_topLeftOutOfBoundaries_diff() constant 57 expected = first.toIntArray(), in performDiff_sameSize_partialCompare_topLeftOutOfBoundaries_diff() 59 width = first.width, in performDiff_sameSize_partialCompare_topLeftOutOfBoundaries_diff() 60 height = first.height, in performDiff_sameSize_partialCompare_topLeftOutOfBoundaries_diff() 69 val first = loadBitmap("round_rect_gray") in performDiff_sameSize_partialCompare_topLeft_diffBoundaries() constant 75 expected = first.toIntArray(), in performDiff_sameSize_partialCompare_topLeft_diffBoundaries() [all …]
|
D | ScreenshotTestRuleTest.kt | 65 val first = loadBitmap(goldenIdentifier) in goldenIdentifierResolver() constant 67 first.assertAgainstGolden(rule, goldenIdentifier, matcher = PixelPerfectMatcher()) in goldenIdentifierResolver() 75 val first = in goldenIdentifierResolver() constant 81 first.assertAgainstGolden(rule, goldenIdentifier, matcher = PixelPerfectMatcher()) in goldenIdentifierResolver() 87 val first = loadBitmap("round_rect_gray") in goldenIdentifierResolver() constant 92 first.assertAgainstGolden( in goldenIdentifierResolver() 104 val first = loadBitmap("qmc-folder1") in goldenIdentifierResolver() constant 105 val startHeight = 18 * first.height / 20 in goldenIdentifierResolver() 106 val endHeight = 37 * first.height / 40 in goldenIdentifierResolver() 107 val startWidth = 10 * first.width / 20 in goldenIdentifierResolver() [all …]
|
/platform_testing/libraries/screenshot/src/androidTest/java/platform/test/screenshot/matchers/ |
D | HumanEyeMatcherTest.kt | 85 val first = loadBitmap("round_rect_gray") in <lambda>() constant 90 expected = first.toIntArray(), in <lambda>() 92 width = first.width, in <lambda>() 93 height = first.height in <lambda>() 101 val first = IntArray(6) { Color.BLACK } in <lambda>() constant 106 expected = first, in <lambda>() 128 val first = IntArray(9) { Color.BLACK } in <lambda>() constant 134 expected = first, in <lambda>() 159 val first = IntArray(9) { Color.BLACK } in <lambda>() constant 165 expected = first, in <lambda>() [all …]
|
D | AlmostPerfectMatcherTest.kt | 103 val first = loadBitmap("round_rect_gray") in performDiff_sameBitmaps() constant 109 expected = first.toIntArray(), in performDiff_sameBitmaps() 111 width = first.width, in performDiff_sameBitmaps() 112 height = first.height in performDiff_sameBitmaps() 120 val first = loadBitmap("qmc-folder1") in performDiff_sameSize_partialCompare_checkDiffImage() constant 127 expected = first.toIntArray(), in performDiff_sameSize_partialCompare_checkDiffImage() 129 width = first.width, in performDiff_sameSize_partialCompare_checkDiffImage() 130 height = first.height, in performDiff_sameSize_partialCompare_checkDiffImage() 136 for (i in 0 until first.height) { in performDiff_sameSize_partialCompare_checkDiffImage() 137 for (j in 0 until first.width) { in performDiff_sameSize_partialCompare_checkDiffImage() [all …]
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/events/ |
D | CujTraceTest.kt | 46 Truth.assertThat(trace.entries.first().cuj).isEqualTo(CujType.CUJ_LAUNCHER_ALL_APPS_SCROLL) in canCreateFromListOfCujEvents() 47 Truth.assertThat(trace.entries.first().startTimestamp.unixNanos).isEqualTo(1) in canCreateFromListOfCujEvents() 48 Truth.assertThat(trace.entries.first().endTimestamp.unixNanos).isEqualTo(2) in canCreateFromListOfCujEvents() 49 Truth.assertThat(trace.entries.first().canceled).isFalse() in canCreateFromListOfCujEvents() 72 Truth.assertThat(trace.entries.first().cuj).isEqualTo(CujType.CUJ_LAUNCHER_ALL_APPS_SCROLL) in canCreateFromListOfCujEventsWithTags() 73 Truth.assertThat(trace.entries.first().tag).isEqualTo("MySubType") in canCreateFromListOfCujEventsWithTags() 74 Truth.assertThat(trace.entries.first().startTimestamp.unixNanos).isEqualTo(1) in canCreateFromListOfCujEventsWithTags() 75 Truth.assertThat(trace.entries.first().endTimestamp.unixNanos).isEqualTo(2) in canCreateFromListOfCujEventsWithTags() 76 Truth.assertThat(trace.entries.first().canceled).isFalse() in canCreateFromListOfCujEventsWithTags() 98 Truth.assertThat(trace.entries.first().cuj).isEqualTo(CujType.CUJ_LAUNCHER_ALL_APPS_SCROLL) in canCreateCanceledCujsFromListOfCujEvents() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/parsers/ |
D | AbstractParser.kt | 71 to < entries.first() -> { in getTimestampsInRange() 91 var first = entries.indexOfFirst { it >= from } in getTimestampsInRange() variable 92 require(first >= 0) { "No match found for first index" } in getTimestampsInRange() 96 if (addInitialEntry && first > 0 && entries[first] > from) { in getTimestampsInRange() 100 first-- in getTimestampsInRange() 103 entries.slice(first..last).toSet() in getTimestampsInRange()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/monitors/events/ |
D | EventLogMonitorTest.kt | 104 eventLog.focusEvents.first().window in canCaptureFocusEventLogs() 106 assertEquals(FocusEvent.Type.LOST, eventLog.focusEvents.first().type) in canCaptureFocusEventLogs() 109 eventLog.focusEvents.drop(1).first().window in canCaptureFocusEventLogs() 111 assertEquals(FocusEvent.Type.GAINED, eventLog.focusEvents.drop(1).first().type) in canCaptureFocusEventLogs() 113 eventLog.focusEvents.first().timestamp <= eventLog.focusEvents.drop(1).first().timestamp in canCaptureFocusEventLogs() 115 assertEquals(eventLog.focusEvents.first().reason, "test") in canCaptureFocusEventLogs() 160 eventLog.focusEvents.first().window in onlyCapturesLastTransition() 162 assertEquals(FocusEvent.Type.LOST, eventLog.focusEvents.first().type) in onlyCapturesLastTransition() 165 eventLog.focusEvents.drop(1).first().window in onlyCapturesLastTransition() 167 assertEquals(FocusEvent.Type.GAINED, eventLog.focusEvents.drop(1).first().type) in onlyCapturesLastTransition() [all …]
|
/platform_testing/libraries/flicker/test/src/android/tools/flicker/config/ |
D | FlickerConfigTest.kt | 43 Truth.assertThat(entries.first().scenarioId).isEqualTo(SOME_SCENARIO) in canRegisterScenario() 66 Truth.assertThat(entries.first().scenarioId).isEqualTo(SOME_SCENARIO) in canRegisterScenarioWithAssertions() 69 val scenarioSlices = entries.first().extractor.extract(reader) in canRegisterScenarioWithAssertions() 72 ScenarioInstanceImpl.fromSlice(scenarioSlices.first(), reader, entries.first()) in canRegisterScenarioWithAssertions() 76 assertions.first().execute() in canRegisterScenarioWithAssertions() 118 Truth.assertThat(entries.first().scenarioId).isEqualTo(SOME_SCENARIO) in canUnregisterAssertion() 121 val scenarioSlices = entries.first().extractor.extract(reader) in canUnregisterAssertion() 124 ScenarioInstanceImpl.fromSlice(scenarioSlices.first(), reader, entries.first()) in canUnregisterAssertion() 154 Truth.assertThat(entries.first().scenarioId).isEqualTo(SOME_SCENARIO) in canOverrideStabilityGroup() 157 val scenarioSlices = entries.first().extractor.extract(reader) in canOverrideStabilityGroup() [all …]
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/wm/ |
D | TransitionsTraceTest.kt | 65 Truth.assertThat(compressedTrace.entries.first().createTime.elapsedNanos).isEqualTo(10) in canBeCompressed() 66 Truth.assertThat(compressedTrace.entries.first().sendTime.elapsedNanos).isEqualTo(20) in canBeCompressed() 67 Truth.assertThat(compressedTrace.entries.first().dispatchTime.elapsedNanos).isEqualTo(22) in canBeCompressed() 68 Truth.assertThat(compressedTrace.entries.first().finishTime.elapsedNanos).isEqualTo(40) in canBeCompressed()
|
/platform_testing/libraries/flicker/test/src/android/tools/flicker/ |
D | ScenarioInstanceTest.kt | 99 results.first { it.name == "MY_CUSTOM_SCENARIO::myAssertionSingle" } in willReportFlickerAssertions() 101 results.first { it.name == "MY_CUSTOM_SCENARIO::myAssertionMultiple" } in willReportFlickerAssertions() 105 Truth.assertThat(singleAssertionResult.assertionErrors.first()) in willReportFlickerAssertions() 111 Truth.assertThat(multipleAssertionResult.assertionErrors.first()) in willReportFlickerAssertions() 171 val assertion1Result = results.first { it.name == "MY_CUSTOM_SCENARIO::myAssertion1" } in willReportMainBlockAssertions() 174 Truth.assertThat(assertion1Result.assertionErrors.first()) in willReportMainBlockAssertions() 178 val assertion2Result = results.first { it.name == "MY_CUSTOM_SCENARIO::myAssertion2" } in willReportMainBlockAssertions() 181 Truth.assertThat(assertion2Result.assertionErrors.first().message) in willReportMainBlockAssertions() 183 Truth.assertThat(assertion2Result.assertionErrors.drop(1).first().message) in willReportMainBlockAssertions()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/ |
D | UtilsTest.kt | 48 Truth.assertThat(currState.first).isNotEmpty() in canFetchCurrentDeviceState() 55 Truth.assertThat(currStateDump.first).isNotEmpty() in canFetchCurrentDeviceStateOnlyWm() 65 Truth.assertThat(currStateDump.first).isEmpty() in canFetchCurrentDeviceStateOnlyLayers() 77 Truth.assertThat(wmArray.first().windowStates).isNotEmpty() in canParseCurrentDeviceState() 80 Truth.assertThat(layersArray.first().flattenedLayers).isNotEmpty() in canParseCurrentDeviceState()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/extractors/ |
D | TaggedCujTransitionMatcher.kt | 150 transitions.first(), in reader() 151 transitions.drop(1).first(), in reader() 156 listOf(transitions.first()) in reader() 169 val change = transition.changes.first() in isPermissionDialogOpenTransition() 206 val candidateTaskLayerId = candidateTaskLayers.first() in isTrampolinedOpenTransition() 207 val candidateTaskLayer = layers.first { it.id == candidateTaskLayerId } in isTrampolinedOpenTransition() 235 val candidateTrampolinedActivityId = candidateTargetActivities.first() in isTrampolinedOpenTransition() 236 val candidateTrampolinedActivity = layers.first { it.id == candidateTrampolinedActivityId } in isTrampolinedOpenTransition() 241 val candidateTargetActivityId = candidateTargetActivities.first() in isTrampolinedOpenTransition() 242 val candidateTargetActivity = layers.first { it.id == candidateTargetActivityId } in isTrampolinedOpenTransition()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/parsers/ |
D | TraceParserTest.kt | 34 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceWithAllBefore() 62 Truth.assertThat(splitLayersTraceWithInitialEntry.entries.first().timestamp) in canSliceWithAllAfter() 74 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceFromBeforeFirstEntryToMiddle() 92 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceFromBeforeToAfterLastEntry() 101 mockTraceForSliceTests.entries.first().timestamp, in canSliceFromExactStartToAfterLastEntry() 110 mockTraceForSliceTests.entries.first().timestamp, in canSliceFromExactStartToExactEnd() 119 mockTraceForSliceTests.entries.first().timestamp, in canSliceFromExactStartToMiddle() 137 mockTraceForSliceTests.entries.first().timestamp.elapsedNanos - 1, in canSliceFromBeforeToExactEnd() 202 val fromBefore = from < mockTraceForSliceTests.entries.first().timestamp.elapsedNanos in testSliceUsingElapsedTimestamp() 203 val fromAfter = from < mockTraceForSliceTests.entries.first().timestamp.elapsedNanos in testSliceUsingElapsedTimestamp() [all …]
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/events/ |
D | FocusEvent.kt | 67 getWindowFromData(data.first()), in from() 68 getFocusFromData(data.first()), in from() 69 data.drop(1).first().removePrefix("reason="), in from()
|
/platform_testing/libraries/flag-helpers/libflagtest/ |
D | flag_checker.cpp | 36 bool expected_condition = flag_condition.first; in GetFlagsNotMetRequirements() 49 if (feature_flag.first) { in CheckFlagCondition() 50 return feature_flag.first() == expected_condition; in CheckFlagCondition()
|
D | flag_checker_test.cpp | 154 ASSERT_FALSE(unsatisfied_flags[0].first); in TEST_F() 159 ASSERT_TRUE(unsatisfied_flags[1].first); in TEST_F()
|
/platform_testing/libraries/flicker/test/src/android/tools/flicker/extractor/ |
D | ShellTransitionScenarioExtractorTest.kt | 74 Truth.assertThat(slices.first().startTimestamp) in <lambda>() 82 Truth.assertThat(slices.first().endTimestamp) in <lambda>() 90 Truth.assertThat(slices.first().associatedTransition) in <lambda>() 91 .isEqualTo(transitions.first { it.type == TransitionType.OPEN }) in <lambda>()
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/traces/surfaceflinger/ |
D | LayersTraceEntryTest.kt | 43 Truth.assertThat(trace.entries.first().timestamp.systemUptimeNanos).isEqualTo(922839428857) in canParseAllLayers() 113 Truth.assertThat(trace.entries.first().timestamp.systemUptimeNanos).isEqualTo(922839428857) in canParseLayerHierarchy() 115 Truth.assertThat(trace.entries.first().flattenedLayers).hasSize(57) in canParseLayerHierarchy() 116 val layers = trace.entries.first().children in canParseLayerHierarchy() 117 Truth.assertThat(layers.first().children).hasSize(3) in canParseLayerHierarchy() 118 Truth.assertThat(layers.drop(1).first().children).isEmpty() in canParseLayerHierarchy() 130 reader.readLayersTrace()?.entries?.first()?.flattenedLayers in canDetectOrphanLayers() 150 val layer = entry.flattenedLayers.first { it.name == layerName } in testCanParseNonCroppedLayerWithHWC() 167 .that(emptyStates.first().timestamp.systemUptimeNanos) in canParseTraceEmptyState()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/subject/ |
D | FlickerTraceSubject.kt | 63 fun first(): EntrySubject = subjects.firstOrNull() ?: error("Trace is empty") in <lambda>() method 125 val firstState = subjects.first() in <lambda>() 132 var lastVisible = visibleEntriesProvider(subjects.first()) in <lambda>()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/config/splitscreen/ |
D | Components.kt | 46 .first() in <lambda>() 55 val change = associatedTransition.changes.first() in <lambda>() 106 layersTrace.entries.last().flattenedLayers.first { it.id == change.layerId } in <lambda>()
|
/platform_testing/libraries/flicker/src/android/tools/flicker/assertors/assertions/ |
D | FocusChanges.kt | 45 .first { fromComponent.layerMatchesAnyOf(it) } in doEvaluate() 56 .first { toComponent.layerMatchesAnyOf(it) } in doEvaluate()
|
/platform_testing/libraries/app-helpers/interfaces/handheld/src/android/platform/helpers/settings/ |
D | README.md | 7 - If you would like to add a new page in the first layer of Settings, for example, `Display`, please 9 - If you would like to add a new page **not** in the first layer of Settings, for example, 11 the first layer (`display`) in Settings. It means `ISettingsDisplayHelper.java` and
|
/platform_testing/libraries/flicker/utils/test/src/android/tools/utils/ |
D | MockLayerTraceBuilderTest.kt | 49 Truth.assertThat(mockLayer.children.first().screenBounds).isEqualTo(mockLayer.screenBounds) in childrenLayerInheritsParentBounds() 50 Truth.assertThat(mockLayer.children.first().bounds).isEqualTo(mockLayer.bounds) in childrenLayerInheritsParentBounds()
|
/platform_testing/libraries/flicker/utils/src/android/tools/traces/wm/ |
D | TransitMode.kt | 28 fun fromInt(value: Int) = values().first { it.ordinal == value } in <lambda>()
|