From 405a6969a0b2409d5f013e8d2845945b51146eb9 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 14 Nov 2015 22:07:18 +0100 Subject: Fork from Ubuntu's indicator-session project. --- tests/CMakeLists.txt | 12 +++--- tests/ayatana-indicator-session.service.in | 3 ++ tests/backend-dbus/CMakeLists.txt | 9 ++--- tests/backend-dbus/mock-webcredentials.cc | 4 +- tests/backend-dbus/test-actions.cc | 2 +- ...nical.indicator.session.backendmock.gschema.xml | 45 ---------------------- tests/com.canonical.indicator.session.gschema.xml | 37 ------------------ tests/indicator-session.service.in | 3 -- tests/manual | 6 +-- ...atana.indicator.session.backendmock.gschema.xml | 45 ++++++++++++++++++++++ tests/org.ayatana.indicator.session.gschema.xml | 37 ++++++++++++++++++ tests/org.gnome.desktop.lockdown.gschema.xml | 2 +- ....settings-daemon.plugins.media-keys.gschema.xml | 2 +- tests/test-service.cc | 14 +++---- 14 files changed, 109 insertions(+), 112 deletions(-) create mode 100644 tests/ayatana-indicator-session.service.in delete mode 100644 tests/com.canonical.indicator.session.backendmock.gschema.xml delete mode 100644 tests/com.canonical.indicator.session.gschema.xml delete mode 100644 tests/indicator-session.service.in create mode 100644 tests/org.ayatana.indicator.session.backendmock.gschema.xml create mode 100644 tests/org.ayatana.indicator.session.gschema.xml (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 33009a3..4c964ca 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -4,7 +4,7 @@ set_directory_properties (PROPERTIES set_source_files_properties (gschemas.compiled GENERATED) # GSettings: -# compile the schemas our tests use (indicator-session's, lockdown, media-keys) +# compile the schemas our tests use (ayatana-indicator-session's, lockdown, media-keys) # into a gschemas.compiled file in this directory, and help the tests to find # that file by setting -DSCHEMA_DIR set (SCHEMA_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -13,8 +13,8 @@ execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compil OUTPUT_VARIABLE COMPILE_SCHEMA_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE) add_custom_command (OUTPUT gschemas.compiled - DEPENDS ${CMAKE_BINARY_DIR}/data/com.canonical.indicator.session.gschema.xml - ${CMAKE_SOURCE_DIR}/tests/com.canonical.indicator.session.backendmock.gschema.xml + DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.indicator.session.gschema.xml + ${CMAKE_SOURCE_DIR}/tests/org.ayatana.indicator.session.backendmock.gschema.xml ${CMAKE_SOURCE_DIR}/tests/org.gnome.desktop.lockdown.gschema.xml ${CMAKE_SOURCE_DIR}/tests/org.gnome.settings-daemon.plugins.media-keys.gschema.xml COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml ${SCHEMA_DIR} @@ -22,7 +22,7 @@ add_custom_command (OUTPUT gschemas.compiled COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) # DBus Activation -configure_file (indicator-session.service.in indicator-session.service) +configure_file (ayatana-indicator-session.service.in ayatana-indicator-session.service) add_definitions(-DINDICATOR_SERVICE_DIR="${CMAKE_CURRENT_BINARY_DIR}") # look for hearder in our src dir, and also in the directories where we autogenerate files... @@ -47,7 +47,7 @@ add_executable (test-service gschemas.compiled) set_target_properties (test-service PROPERTIES COMPILE_FLAGS " ${CC_WARNING_ARGS} -std=c++0x -g") add_test (test-service test-service) -add_dependencies (test-service libindicatorsessionservice backendmock) -target_link_libraries (test-service libindicatorsessionservice backendmock gtest ${SERVICE_LIBRARIES} ${GTEST_LIBS}) +add_dependencies (test-service libayatanaindicatorsessionservice backendmock) +target_link_libraries (test-service libayatanaindicatorsessionservice backendmock gtest ${SERVICE_LIBRARIES} ${GTEST_LIBS}) add_subdirectory (backend-dbus) diff --git a/tests/ayatana-indicator-session.service.in b/tests/ayatana-indicator-session.service.in new file mode 100644 index 0000000..e688fa0 --- /dev/null +++ b/tests/ayatana-indicator-session.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.ayatana.indicator.session-test +Exec=${CMAKE_BINARY_DIR}/src/ayatana-indicator-session-service --mock diff --git a/tests/backend-dbus/CMakeLists.txt b/tests/backend-dbus/CMakeLists.txt index 6ef68bd..5750d9d 100644 --- a/tests/backend-dbus/CMakeLists.txt +++ b/tests/backend-dbus/CMakeLists.txt @@ -42,21 +42,18 @@ add_executable (test-actions test-actions.cc) add_test (test-actions test-actions) set_tests_properties (test-actions PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-actions desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) +target_link_libraries (test-actions desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) # test the Guest class add_executable (test-guest test-guest.cc) add_test (test-guest test-guest) set_tests_properties (test-guest PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-guest desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) +target_link_libraries (test-guest desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) # test the Users class add_executable (test-users test-users.cc) add_test (test-users test-users) set_tests_properties (test-users PROPERTIES COMPILE_FLAGS "${SERVICE_CFLAGS}") -target_link_libraries (test-users desktopmock backenddbus libindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) - - - +target_link_libraries (test-users desktopmock backenddbus libayatanaindicatorsessionservice gtest ${SERVICE_LDFLAGS} ${GTEST_LIBS} ${GCOV_LIBS}) diff --git a/tests/backend-dbus/mock-webcredentials.cc b/tests/backend-dbus/mock-webcredentials.cc index 22e10b7..6406fc1 100644 --- a/tests/backend-dbus/mock-webcredentials.cc +++ b/tests/backend-dbus/mock-webcredentials.cc @@ -21,8 +21,8 @@ namespace { - const char * const MY_NAME = "com.canonical.indicators.webcredentials"; - const char * const MY_PATH = "/com/canonical/indicators/webcredentials"; + const char * const MY_NAME = "org.ayatana.indicators.webcredentials"; + const char * const MY_PATH = "/org/ayatana/indicators/webcredentials"; } MockWebcredentials :: MockWebcredentials (GMainLoop * loop, diff --git a/tests/backend-dbus/test-actions.cc b/tests/backend-dbus/test-actions.cc index ff5a24d..76a0ab4 100644 --- a/tests/backend-dbus/test-actions.cc +++ b/tests/backend-dbus/test-actions.cc @@ -45,7 +45,7 @@ class Actions: public GTestMockDBusFixture super :: SetUp (); // init 'actions' - indicator_settings = g_settings_new ("com.canonical.indicator.session"); + indicator_settings = g_settings_new ("org.ayatana.indicator.session"); cancellable = g_cancellable_new (); actions = 0; backend_get (cancellable, &actions, NULL, NULL); diff --git a/tests/com.canonical.indicator.session.backendmock.gschema.xml b/tests/com.canonical.indicator.session.backendmock.gschema.xml deleted file mode 100644 index 79d0c02..0000000 --- a/tests/com.canonical.indicator.session.backendmock.gschema.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - '' - The last command activated - - - false - Has online account error - - - true - Is hibernation allowed? - - - true - Is suspending allowed? - - - true - Is logging out allowed? - - - true - Is rebooting allowed? - - - true - Is locking the session allowed? - - - true - Is switching sessions allowed? - - - true - Do we have a way of prompting for confirmation? - - - false - Is this a session running on a live CD? - - - diff --git a/tests/com.canonical.indicator.session.gschema.xml b/tests/com.canonical.indicator.session.gschema.xml deleted file mode 100644 index 60e680b..0000000 --- a/tests/com.canonical.indicator.session.gschema.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - false - Suppress the dialog to confirm logout, restart and shutdown action - Whether or not to show confirmation dialogs for logout, restart and shutdown actions. - - - false - Remove the Log Out item from the session menu - Makes it so that the logout button doesn’t show in the session menu. - - - false - Remove the Restart item from the session menu - Makes it so that the restart button doesn’t show in the session menu. - - - false - Remove the shutdown item from the session menu - Makes it so that the shutdown button doesn’t show in the session menu. - - - false - Determine the visibility of the User's real name on the panel - Allow for the Removal of the users name from the panel - - - true - Show the list of users - Allow for the user menu to be hidden by the user. - - - - - diff --git a/tests/indicator-session.service.in b/tests/indicator-session.service.in deleted file mode 100644 index fb3798a..0000000 --- a/tests/indicator-session.service.in +++ /dev/null @@ -1,3 +0,0 @@ -[D-BUS Service] -Name=com.canonical.indicator.session-test -Exec=${CMAKE_BINARY_DIR}/src/indicator-session-service --mock diff --git a/tests/manual b/tests/manual index 15ee5f6..540d80d 100644 --- a/tests/manual +++ b/tests/manual @@ -1,19 +1,19 @@ -Test-case indicator-session/unity7-items-check +Test-case ayatana-indicator-session/unity7-items-check
Log in to a Unity 7 user session
Go to the panel and click on the Session indicator
Ensure there are items in the menu
-Test-case indicator-session/unity7-greeter-items-check +Test-case ayatana-indicator-session/unity7-greeter-items-check
Start a system and wait for the greeter or logout of the current user session
Go to the panel and click on the Session indicator
Ensure there are items in the menu
-Test-case indicator-session/unity8-items-check +Test-case ayatana-indicator-session/unity8-items-check
Login to a user session running Unity 8
Pull down the top panel until it sticks open
diff --git a/tests/org.ayatana.indicator.session.backendmock.gschema.xml b/tests/org.ayatana.indicator.session.backendmock.gschema.xml new file mode 100644 index 0000000..e9b9fef --- /dev/null +++ b/tests/org.ayatana.indicator.session.backendmock.gschema.xml @@ -0,0 +1,45 @@ + + + + + '' + The last command activated + + + false + Has online account error + + + true + Is hibernation allowed? + + + true + Is suspending allowed? + + + true + Is logging out allowed? + + + true + Is rebooting allowed? + + + true + Is locking the session allowed? + + + true + Is switching sessions allowed? + + + true + Do we have a way of prompting for confirmation? + + + false + Is this a session running on a live CD? + + + diff --git a/tests/org.ayatana.indicator.session.gschema.xml b/tests/org.ayatana.indicator.session.gschema.xml new file mode 100644 index 0000000..c81fe60 --- /dev/null +++ b/tests/org.ayatana.indicator.session.gschema.xml @@ -0,0 +1,37 @@ + + + + + false + Suppress the dialog to confirm logout, restart and shutdown action + Whether or not to show confirmation dialogs for logout, restart and shutdown actions. + + + false + Remove the Log Out item from the session menu + Makes it so that the logout button doesn’t show in the session menu. + + + false + Remove the Restart item from the session menu + Makes it so that the restart button doesn’t show in the session menu. + + + false + Remove the shutdown item from the session menu + Makes it so that the shutdown button doesn’t show in the session menu. + + + false + Determine the visibility of the User's real name on the panel + Allow for the Removal of the users name from the panel + + + true + Show the list of users + Allow for the user list to be hidden by the user. + + + + + \ No newline at end of file diff --git a/tests/org.gnome.desktop.lockdown.gschema.xml b/tests/org.gnome.desktop.lockdown.gschema.xml index 6ccee17..a74f024 100644 --- a/tests/org.gnome.desktop.lockdown.gschema.xml +++ b/tests/org.gnome.desktop.lockdown.gschema.xml @@ -42,4 +42,4 @@ Prevent the user from logging out. - \ No newline at end of file + diff --git a/tests/org.gnome.settings-daemon.plugins.media-keys.gschema.xml b/tests/org.gnome.settings-daemon.plugins.media-keys.gschema.xml index 3f8dd50..9449142 100644 --- a/tests/org.gnome.settings-daemon.plugins.media-keys.gschema.xml +++ b/tests/org.gnome.settings-daemon.plugins.media-keys.gschema.xml @@ -200,4 +200,4 @@ Command to run when the binding is invoked - \ No newline at end of file + diff --git a/tests/test-service.cc b/tests/test-service.cc index 9ee7236..7dae887 100644 --- a/tests/test-service.cc +++ b/tests/test-service.cc @@ -152,11 +152,11 @@ class ServiceTest: public GTestDBusFixture any_item_changed = FALSE; timer = g_timer_new (); - mock_settings = g_settings_new ("com.canonical.indicator.session.backendmock"); + mock_settings = g_settings_new ("org.ayatana.indicator.session.backendmock"); mock_actions = indicator_session_actions_mock_new (); mock_users = indicator_session_users_mock_new (); mock_guest = indicator_session_guest_mock_new (); - indicator_settings = g_settings_new ("com.canonical.indicator.session"); + indicator_settings = g_settings_new ("org.ayatana.indicator.session"); // Start an IndicatorSessionService and wait for it to appear on the bus. // This way our calls to g_dbus_*_get() in the next paragraph won't activate @@ -165,7 +165,7 @@ class ServiceTest: public GTestDBusFixture // wait for the service to show up on the bus const guint watch_id = g_bus_watch_name_on_connection (conn, - "com.canonical.indicator.session", + "org.ayatana.indicator.session", G_BUS_NAME_WATCHER_FLAGS_NONE, on_name_appeared, // quits the loop NULL, this, NULL); @@ -177,11 +177,11 @@ class ServiceTest: public GTestDBusFixture // get the actions & menus that the service exported. action_group = g_dbus_action_group_get (conn, - "com.canonical.indicator.session", - "/com/canonical/indicator/session"); + "org.ayatana.indicator.session", + "/org/ayatana/indicator/session"); menu_model = g_dbus_menu_model_get (conn, - "com.canonical.indicator.session", - "/com/canonical/indicator/session/desktop"); + "org.ayatana.indicator.session", + "/org/ayatana/indicator/session/desktop"); // the actions are added asynchronously, so wait for the actions if (!g_action_group_has_action (G_ACTION_GROUP(action_group), "about")) wait_for_signal (action_group, "action-added"); -- cgit v1.2.3