diff --git a/crates/ely_app/src/shell/web_surface_live_site_tests.rs b/crates/ely_app/src/shell/web_surface_live_site_tests.rs index 528eded..b61c996 100644 --- a/crates/ely_app/src/shell/web_surface_live_site_tests.rs +++ b/crates/ely_app/src/shell/web_surface_live_site_tests.rs @@ -58,6 +58,7 @@ fn assert_web_surfaces_render(cases: &[LiveSiteCase]) -> Result<(), Box 0, "{}", case.url); } +fn log_prd_frame(label: &str, frame: &WebSurfaceFrame, case: &LiveSiteCase) { + eprintln!( + "prd-live-site {label} url={} loaded={} title={} state={} size={}x{} content_pixels={} non_white_pixels={} sample_hash={}", + case.url, + frame.url_label(), + frame.title_label(), + frame.render_state(), + frame.size().width, + frame.size().height, + frame.content_pixel_count(), + frame.non_white_pixel_count(), + frame.sample_hash() + ); +} + fn assert_render_state_is_open(state: &str, url: &str) { assert!(matches!(state, "complete" | "loading"), "{url} state: {state}"); } diff --git a/crates/ely_servo_host/tests/sidecar/support.rs b/crates/ely_servo_host/tests/sidecar/support.rs index 0ec8db3..add3dd1 100644 --- a/crates/ely_servo_host/tests/sidecar/support.rs +++ b/crates/ely_servo_host/tests/sidecar/support.rs @@ -98,6 +98,8 @@ pub(super) fn snapshot_prd_site( assert!(report_field_as_u64(&report, "sample_hash")? > 0, "{}", case.url); assert_eq!(std::fs::metadata(&output_path)?.len(), size.width * size.height * 4); + log_prd_report(&report, case, size)?; + std::fs::remove_file(&output_path)?; Ok(report) } @@ -343,6 +345,26 @@ fn assert_report_state_is_renderable(report: &serde_json::Value) -> Result<(), B Ok(()) } +fn log_prd_report( + report: &serde_json::Value, + case: &PrdSiteCompatibilityCase, + size: FrameSize, +) -> Result<(), Box> { + eprintln!( + "prd-live-site servo-sidecar url={} loaded={} title={} state={} size={}x{} content_pixels={} non_white_pixels={} sample_hash={}", + case.url, + report_field_as_text(report, "loaded_url")?, + report_field_as_text(report, "title")?, + report_field_as_text(report, "state")?, + size.width, + size.height, + report_field_as_u64(report, "content_pixel_count")?, + report_field_as_u64(report, "non_white_pixel_count")?, + report_field_as_u64(report, "sample_hash")? + ); + Ok(()) +} + fn report_field_as_text<'a>( report: &'a serde_json::Value, field: &'static str, diff --git a/scripts/verify_prd_site_rendering.sh b/scripts/verify_prd_site_rendering.sh index 9f562af..7cc45b6 100755 --- a/scripts/verify_prd_site_rendering.sh +++ b/scripts/verify_prd_site_rendering.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash set -euo pipefail -cargo test -p ely_app --features live-site-smoke --all-targets -- --test-threads=1 -cargo test -p ely_servo_host --features servo-engine --test sidecar -- --test-threads=1 +echo "Verifying PRD live sites through the GPUI web surface adapter" +cargo test -p ely_app --features live-site-smoke --all-targets -- --test-threads=1 --nocapture + +echo "Verifying PRD live sites through Servo sidecar RGBA snapshots" +cargo test -p ely_servo_host --features servo-engine --test sidecar -- --test-threads=1 --nocapture