diff --git a/crates/engine/tests/cmyk_flatten_profile.rs b/crates/engine/tests/cmyk_flatten_profile.rs index 28b3bf9afc..41739f5326 100644 --- a/crates/engine/tests/cmyk_flatten_profile.rs +++ b/crates/engine/tests/cmyk_flatten_profile.rs @@ -174,3 +174,19 @@ fn merge_visible_separates_through_the_document_profile() { assert!(d <= ROUND_TRIP, "{depth}-bit Merge Visible: inks moved by {d}"); } } + +/// Rasterize Layer Style bakes the layer through the RGB composite and separates the result +/// back: through the document's profile, the one the layer was read with (#3778), so the inks +/// under the effect-free area come back within the profile's round trip. The drop shadow falls +/// off the canvas, so every pixel checked is the layer's own. +#[test] +fn rasterize_layer_style_separates_through_the_document_profile() { + for depth in [8, 16] { + let d = drift(depth, true, 0, |s| { + s.execute("layer.new.layerFromBackground", json!({})).unwrap(); + s.execute("layer.layerStyle.dropShadow", json!({"distance": 40, "size": 0})).unwrap(); + s.execute("layer.rasterize.layerStyle", json!({})).unwrap(); + }); + assert!(d <= ROUND_TRIP, "{depth}-bit Rasterize Layer Style: inks moved by {d}"); + } +}