mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
tests/stage-view: Verify stage view list length after updating
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2025>
This commit is contained in:
parent
666a30952c
commit
5b35860b31
@ -1063,12 +1063,14 @@ static void
|
|||||||
ensure_view_count (int n_views)
|
ensure_view_count (int n_views)
|
||||||
{
|
{
|
||||||
MetaBackend *backend = meta_get_backend ();
|
MetaBackend *backend = meta_get_backend ();
|
||||||
|
ClutterActor *stage = meta_backend_get_stage (backend);
|
||||||
MetaMonitorManager *monitor_manager =
|
MetaMonitorManager *monitor_manager =
|
||||||
meta_backend_get_monitor_manager (backend);
|
meta_backend_get_monitor_manager (backend);
|
||||||
MetaMonitorManagerTest *monitor_manager_test =
|
MetaMonitorManagerTest *monitor_manager_test =
|
||||||
META_MONITOR_MANAGER_TEST (monitor_manager);
|
META_MONITOR_MANAGER_TEST (monitor_manager);
|
||||||
MonitorTestCaseSetup test_case_setup;
|
MonitorTestCaseSetup test_case_setup;
|
||||||
MetaMonitorTestSetup *test_setup;
|
MetaMonitorTestSetup *test_setup;
|
||||||
|
GList *stage_views;
|
||||||
|
|
||||||
test_case_setup = initial_test_case_setup;
|
test_case_setup = initial_test_case_setup;
|
||||||
test_case_setup.n_outputs = n_views;
|
test_case_setup.n_outputs = n_views;
|
||||||
@ -1076,6 +1078,9 @@ ensure_view_count (int n_views)
|
|||||||
test_setup = create_monitor_test_setup (&test_case_setup,
|
test_setup = create_monitor_test_setup (&test_case_setup,
|
||||||
MONITOR_TEST_FLAG_NO_STORED);
|
MONITOR_TEST_FLAG_NO_STORED);
|
||||||
meta_monitor_manager_test_emulate_hotplug (monitor_manager_test, test_setup);
|
meta_monitor_manager_test_emulate_hotplug (monitor_manager_test, test_setup);
|
||||||
|
|
||||||
|
stage_views = clutter_stage_peek_stage_views (CLUTTER_STAGE (stage));
|
||||||
|
g_assert_cmpuint (g_list_length (stage_views), ==, n_views);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
Reference in New Issue
Block a user