diff --git a/crates/gpui2/src/app/test_context.rs b/crates/gpui2/src/app/test_context.rs index 9f0c7e6aca01a934277f2f11f22bee90c4d68d36..c77ec29bdf288f1300210b4c2b82cedbf0aef3bc 100644 --- a/crates/gpui2/src/app/test_context.rs +++ b/crates/gpui2/src/app/test_context.rs @@ -567,12 +567,7 @@ impl<'a> VisualTestContext<'a> { pub fn window_title(&mut self) -> Option { self.cx .update_window(self.window, |_, cx| { - cx.window - .platform_window - .as_test() - .unwrap() - .window_title - .clone() + cx.window.platform_window.as_test().unwrap().title.clone() }) .unwrap() } diff --git a/crates/gpui2/src/platform/test/window.rs b/crates/gpui2/src/platform/test/window.rs index 0f981d44783ed2434361d639234ebed2c1ceb85f..9df513d1f7ea46b0dffb452d27dbd82f5aba2176 100644 --- a/crates/gpui2/src/platform/test/window.rs +++ b/crates/gpui2/src/platform/test/window.rs @@ -21,7 +21,8 @@ pub(crate) struct TestWindowHandlers { pub struct TestWindow { pub(crate) bounds: WindowBounds, display: Rc, - pub(crate) window_title: Option, + pub(crate) title: Option, + pub(crate) edited: bool, pub(crate) input_handler: Option>>>, pub(crate) handlers: Arc>, platform: Weak, @@ -41,7 +42,8 @@ impl TestWindow { input_handler: None, sprite_atlas: Arc::new(TestAtlas::new()), handlers: Default::default(), - window_title: Default::default(), + title: Default::default(), + edited: false, } } } @@ -109,11 +111,11 @@ impl PlatformWindow for TestWindow { } fn set_title(&mut self, title: &str) { - self.window_title = Some(title.to_owned()); + self.title = Some(title.to_owned()); } - fn set_edited(&mut self, _edited: bool) { - unimplemented!() + fn set_edited(&mut self, edited: bool) { + self.edited = edited; } fn show_character_palette(&self) {