tests: Add monitor store and config test for output underscanning
https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
@ -176,6 +176,9 @@ check_monitor_configuration (MetaMonitorConfigStore *config_store,
|
||||
g_assert_cmpfloat (monitor_config->mode_spec->refresh_rate,
|
||||
==,
|
||||
test_monitor->mode.refresh_rate);
|
||||
g_assert_cmpint (monitor_config->is_underscanning,
|
||||
==,
|
||||
test_monitor->is_underscanning);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -394,6 +397,56 @@ meta_test_monitor_store_primary (void)
|
||||
check_monitor_configurations (&expect);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_test_monitor_store_underscanning (void)
|
||||
{
|
||||
MonitorStoreTestExpect expect = {
|
||||
.configurations = {
|
||||
{
|
||||
.logical_monitors = {
|
||||
{
|
||||
.layout = {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = 1024,
|
||||
.height = 768
|
||||
},
|
||||
.is_primary = TRUE,
|
||||
.is_presentation = FALSE,
|
||||
.monitors = {
|
||||
{
|
||||
.connector = "DP-1",
|
||||
.vendor = "MetaProduct's Inc.",
|
||||
.product = "MetaMonitor",
|
||||
.serial = "0x123456",
|
||||
.is_underscanning = TRUE,
|
||||
.mode = {
|
||||
.width = 1024,
|
||||
.height = 768,
|
||||
.refresh_rate = 60.000495910644531
|
||||
}
|
||||
}
|
||||
},
|
||||
.n_monitors = 1,
|
||||
},
|
||||
},
|
||||
.n_logical_monitors = 1
|
||||
}
|
||||
},
|
||||
.n_configurations = 1
|
||||
};
|
||||
|
||||
if (!is_using_monitor_config_manager ())
|
||||
{
|
||||
g_test_skip ("Not using MetaMonitorConfigManager");
|
||||
return;
|
||||
}
|
||||
|
||||
set_custom_monitor_config ("underscanning.xml");
|
||||
|
||||
check_monitor_configurations (&expect);
|
||||
}
|
||||
|
||||
void
|
||||
init_monitor_store_tests (void)
|
||||
{
|
||||
@ -403,4 +456,6 @@ init_monitor_store_tests (void)
|
||||
meta_test_monitor_store_vertical);
|
||||
g_test_add_func ("/backends/monitor-store/primary",
|
||||
meta_test_monitor_store_primary);
|
||||
g_test_add_func ("/backends/monitor-store/underscanning",
|
||||
meta_test_monitor_store_underscanning);
|
||||
}
|
||||
|
Reference in New Issue
Block a user