it: test suspended state
This commit is contained in:
parent
3f4386609e
commit
91022cd1c8
12 changed files with 119 additions and 33 deletions
|
|
@ -1,13 +1,20 @@
|
|||
use {
|
||||
crate::{
|
||||
it::test_error::TestResult,
|
||||
tree::{OutputNode, WorkspaceNode},
|
||||
it::{
|
||||
test_error::TestResult,
|
||||
test_utils::{
|
||||
test_container_node_ext::TestContainerExt,
|
||||
test_workspace_node_ext::TestWorkspaceNodeExt,
|
||||
},
|
||||
},
|
||||
tree::{OutputNode, ToplevelNode, WorkspaceNode},
|
||||
},
|
||||
std::rc::Rc,
|
||||
};
|
||||
|
||||
pub trait TestOutputNodeExt {
|
||||
fn workspace(&self) -> TestResult<Rc<WorkspaceNode>>;
|
||||
fn first_toplevel(&self) -> TestResult<Rc<dyn ToplevelNode>>;
|
||||
}
|
||||
|
||||
impl TestOutputNodeExt for OutputNode {
|
||||
|
|
@ -17,4 +24,8 @@ impl TestOutputNodeExt for OutputNode {
|
|||
Some(w) => Ok(w),
|
||||
}
|
||||
}
|
||||
|
||||
fn first_toplevel(&self) -> TestResult<Rc<dyn ToplevelNode>> {
|
||||
self.workspace()?.container()?.first_toplevel()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ impl TestWindow {
|
|||
self.surface.attach(buffer.id)?;
|
||||
self.viewport.set_source(0, 0, 1, 1)?;
|
||||
self.viewport
|
||||
.set_destination(self.tl.width.get(), self.tl.height.get())?;
|
||||
.set_destination(self.tl.core.width.get(), self.tl.core.height.get())?;
|
||||
self.xdg.ack_configure(self.xdg.last_serial.get())?;
|
||||
self.surface.commit()?;
|
||||
self.surface.tran.sync().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue