it: test seat creation and broadcast
This commit is contained in:
parent
fa8d079c72
commit
cdab4d4cad
9 changed files with 121 additions and 27 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue