diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_gnome_session_manager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_gnome_session_manager.cpp b/tests/test_gnome_session_manager.cpp index b78329884..b7e2c58a2 100644 --- a/tests/test_gnome_session_manager.cpp +++ b/tests/test_gnome_session_manager.cpp @@ -70,6 +70,9 @@ R"(<node> const std::string LOGIND_MANAGER = R"(<node> <interface name="org.freedesktop.login1.Manager"> + <method name="GetSession"> + <arg type="s" name="result" direction="out"/> + </method> <method name="CanSuspend"> <arg type="s" name="result" direction="out"/> </method> @@ -186,7 +189,11 @@ struct TestGnomeSessionManager : testing::Test logind_->AddObjects(introspection::LOGIND_MANAGER, LOGIND_MANAGER_PATH); logind_->AddObjects(introspection::LOGIND_SESSION, LOGIND_SESSION_PATH); logind_->GetObjects().front()->SetMethodsCallsHandler([&] (std::string const& method, GVariant*) -> GVariant* { - if (method == "CanSuspend") + if (method == "GetSession") + { + return g_variant_new("(o)", "id0"); + } + else if (method == "CanSuspend") { suspend_called = true; return g_variant_new("(s)", can_suspend_ ? "yes" : "no"); |
