Skip to content

Commit c0ec57e

Browse files
committed
awaitAnimationFrame instead of awaitWithYield
1 parent 5577af9 commit c0ec57e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compose/ui/ui/src/webTest/kotlin/androidx/compose/ui/OnCanvasTests.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ internal class WebApplicationScope(
176176
private val initialRecomposers = Recomposer.runningRecomposers.value
177177

178178
suspend fun awaitIdle(): Unit = measureTime {
179-
awaitWithYield()
179+
awaitAnimationFrame()
180180

181181
Snapshot.sendApplyNotifications()
182182

@@ -186,8 +186,8 @@ internal class WebApplicationScope(
186186
recomposerInfo.state.takeWhile { it > Recomposer.State.Idle }.collect()
187187
}
188188

189-
awaitWithYield()
190-
}.let { println("Total awaitIdle time: $it\n") }
189+
awaitAnimationFrame()
190+
}.let { println("Total awaitIdle time = $it\n") }
191191

192192
/**
193193
* awaitAnimationFrame is needed for text input tests,

0 commit comments

Comments
 (0)