Merge "Test for onPlaced on InnerPlaceable" into androidx-main am: 811bf69245

Original change: https://android-review.googlesource.com/c/platform/frameworks/support/+/2055135

Change-Id: Ie997329638718df8895f760701001c1b073d9651
Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/LayoutCoordinatesHelperTest.kt b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/LayoutCoordinatesHelperTest.kt
index 45010ba..de12ba2 100644
--- a/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/LayoutCoordinatesHelperTest.kt
+++ b/compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/LayoutCoordinatesHelperTest.kt
@@ -232,6 +232,17 @@
         }
     }
 
+    @Test
+    fun onBoxPlaced_failing() {
+        var coordinates: LayoutCoordinates? = null
+        rule.setContent {
+            Box(Modifier.onPlaced { coordinates = it })
+        }
+        rule.runOnIdle {
+            assertThat(coordinates).isNotNull()
+        }
+    }
+
     private fun LayoutCoordinates.placementInParent() =
         parentCoordinates!!.localPositionOf(this, Offset.Zero).round()
 }