1
0
Fork 0
forked from wry/wry

it: test seat creation and broadcast

This commit is contained in:
Julian Orth 2022-05-03 15:25:48 +02:00
parent fa8d079c72
commit cdab4d4cad
9 changed files with 121 additions and 27 deletions

View file

@ -1,6 +1,7 @@
use {
crate::{
client::{ClientId, RequestParser},
ifs::wl_seat::WlSeatGlobal,
it::{
test_backend::TestBackend,
test_client::TestClient,
@ -89,6 +90,16 @@ impl TestRun {
registry,
}))
}
pub fn get_seat(&self, name: &str) -> Result<Rc<WlSeatGlobal>, TestError> {
let id = self.cfg.get_seat(name)?;
for seat in self.state.globals.seats.lock().values() {
if seat.id() == id {
return Ok(seat.clone());
}
}
bail!("Seat {} does not exist", id)
}
}
pub trait ParseFull<'a>: Sized {