1
0
Fork 0
forked from wry/wry

it: test content type protocol

This commit is contained in:
Julian Orth 2024-04-02 21:25:49 +02:00
parent 3b0757ee53
commit fd056c5361
8 changed files with 149 additions and 2 deletions

View file

@ -0,0 +1,25 @@
use {
crate::{
ifs::wp_content_type_v1::ContentType,
it::{test_error::TestResult, testrun::TestRun},
},
std::rc::Rc,
};
testcase!();
async fn test(run: Rc<TestRun>) -> TestResult {
let _ds = run.create_default_setup().await?;
let client = run.create_client().await?;
let surface = client.comp.create_surface().await?;
let ctm = client.registry.get_content_type_manager().await?;
let ct = ctm.get_surface_content_type(&surface)?;
ct.set_content_type(2)?;
surface.commit()?;
client.sync().await;
tassert_eq!(surface.server.content_type.get(), Some(ContentType::Video));
Ok(())
}