428 {
429 LaunchParentViewInRealm({"--showOverlay"});
430
431
432 ASSERT_TRUE(TakeScreenshotUntil(
433 kChildBackgroundColor,
434 [](std::map<fuchsia_test_utils::Pixel, uint32_t> histogram) {
435
436
437 const uint32_t overlay_pixel_count = OverlayPixelCount(histogram);
438 EXPECT_GT(histogram[kParentBackgroundColor], 0u);
439 EXPECT_GT(overlay_pixel_count, 0u);
440 EXPECT_GT(histogram[kChildBackgroundColor], 0u);
441 EXPECT_GT(histogram[kParentBackgroundColor],
442 histogram[kChildBackgroundColor]);
443 EXPECT_GT(overlay_pixel_count, histogram[kChildBackgroundColor]);
444 }));
445}