test(core): allow diagnostics in lifecycle panic isolation

This commit is contained in:
ldm0
2026-11-19 01:02:24 +08:00
parent ab75a5e4e1
commit bbb3941ec6
+4 -2
View File
@@ -260,11 +260,13 @@ async fn follow_navigation_grace_cannot_extend_fetch_timeout() -> Result<()> {
async fn lifecycle_decider_error_and_panic_retire_only_pending_page() -> Result<()> {
let browser = Browser::new(AppConfig::default())?;
// This exercises error isolation, not the fetch deadline. Leave enough
// time for the panic hook to print a backtrace under parallel test load.
let error = browser
.fetch_document_with_lifecycle_decider(
Request::get("about:blank")?,
RenderedDomWaitUntil::Done,
Duration::from_secs(1),
Duration::from_secs(5),
|_| Err(anyhow!("policy rejected target")),
)
.await
@@ -278,7 +280,7 @@ async fn lifecycle_decider_error_and_panic_retire_only_pending_page() -> Result<
.fetch_document_with_lifecycle_decider(
Request::get("about:blank")?,
RenderedDomWaitUntil::Done,
Duration::from_secs(1),
Duration::from_secs(5),
|_| -> Result<RendererLifecycleDecision> { panic!("policy panic sentinel") },
)
.await