it: track whether objects have been deleted
This commit is contained in:
parent
cdab4d4cad
commit
6af9d909b8
22 changed files with 167 additions and 45 deletions
|
|
@ -2,8 +2,11 @@ use {
|
|||
crate::{
|
||||
client::ClientId,
|
||||
it::{
|
||||
test_error::TestError, test_ifs::test_screenshot::TestJayScreenshot,
|
||||
test_object::TestObject, test_transport::TestTransport, testrun::ParseFull,
|
||||
test_error::TestError,
|
||||
test_ifs::test_screenshot::TestJayScreenshot,
|
||||
test_object::{Deleted, TestObject},
|
||||
test_transport::TestTransport,
|
||||
testrun::ParseFull,
|
||||
},
|
||||
utils::buffd::MsgParser,
|
||||
wire::{
|
||||
|
|
@ -19,11 +22,13 @@ pub struct TestJayCompositor {
|
|||
pub id: JayCompositorId,
|
||||
pub tran: Rc<TestTransport>,
|
||||
pub client_id: Cell<Option<ClientId>>,
|
||||
pub deleted: Deleted,
|
||||
}
|
||||
|
||||
impl TestJayCompositor {
|
||||
pub async fn get_client_id(&self) -> Result<ClientId, TestError> {
|
||||
if self.client_id.get().is_none() {
|
||||
self.deleted.check()?;
|
||||
self.tran.send(GetClientId { self_id: self.id });
|
||||
}
|
||||
self.tran.sync().await;
|
||||
|
|
@ -37,7 +42,9 @@ impl TestJayCompositor {
|
|||
let js = Rc::new(TestJayScreenshot {
|
||||
id: self.tran.id(),
|
||||
result: Cell::new(None),
|
||||
deleted: Default::default(),
|
||||
});
|
||||
self.deleted.check()?;
|
||||
self.tran.send(TakeScreenshot {
|
||||
self_id: self.id,
|
||||
id: js.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue