diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-11-12 08:40:14 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2015-11-12 08:16:04 +0000 |
commit | 0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f (patch) | |
tree | 4af026cbc883daf53fb57056fe5d14fbe3c618d2 /tests | |
parent | 511915f11b83c0b0327b9ed393e5bc2ff3b828a0 (diff) | |
download | ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.tar.gz ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.tar.bz2 ayatana-indicator-power-0f33bc4be7e9dffaa6b68cd758c3c531460c9a2f.zip |
Fork from Ubuntu's indicator-power code project.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/manual | 20 | ||||
-rw-r--r-- | tests/test-device.cc | 4 | ||||
-rw-r--r-- | tests/test-notify.cc | 4 |
4 files changed, 18 insertions, 18 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 02ecb1b..0d3d54a 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -20,7 +20,7 @@ set_directory_properties (PROPERTIES set_source_files_properties (gschemas.compiled GENERATED) # GSettings: -# compile the indicator-power schema into a gschemas.compiled file in this directory, +# compile the ayatana-indicator-power schema 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}) add_definitions(-DSCHEMA_DIR="${SCHEMA_DIR}") @@ -28,7 +28,7 @@ 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.power.gschema.xml + DEPENDS ${CMAKE_BINARY_DIR}/data/org.ayatana.indicator.power.gschema.xml COMMAND cp -f ${CMAKE_BINARY_DIR}/data/*gschema.xml ${SCHEMA_DIR} COMMAND ${COMPILE_SCHEMA_EXECUTABLE} ${SCHEMA_DIR}) @@ -44,8 +44,8 @@ function(add_test_by_name name) set (TEST_NAME ${name}) add_executable (${TEST_NAME} ${TEST_NAME}.cc gschemas.compiled) add_test (${TEST_NAME} ${TEST_NAME}) - add_dependencies (${TEST_NAME} libindicatorpowerservice) - target_link_libraries (${TEST_NAME} indicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) + add_dependencies (${TEST_NAME} libayatanaindicatorpowerservice) + target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS}) endfunction() add_test_by_name(test-notify) add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true) diff --git a/tests/manual b/tests/manual index 8a305ac..91d005d 100644 --- a/tests/manual +++ b/tests/manual @@ -3,32 +3,32 @@ Notes on Battery Testing Mock battery propreties are available for testing purposes. -The testing properties are DBus properties published on busname "com.canonical.indicator.power", object path "/com/canonical/indicator/power/Testing", and interface "com.canonical.indicator.power.Testing". The four properties are "MockBatteryEnabled" (boolean, default false), "MockBatteryLevel" (uint32 [0-100], default 50), "MockBatteryState" (string, default 'discharging'), "MockBatteryMinutesLeft" (minutes remaining to charge/discharge, uint32, default 30). +The testing properties are DBus properties published on busname "org.ayatana.indicator.power", object path "/org/ayatana/indicator/power/Testing", and interface "org.ayatana.indicator.power.Testing". The four properties are "MockBatteryEnabled" (boolean, default false), "MockBatteryLevel" (uint32 [0-100], default 50), "MockBatteryState" (string, default 'discharging'), "MockBatteryMinutesLeft" (minutes remaining to charge/discharge, uint32, default 30). Example use: Show the testing properties: -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.GetAll \ - com.canonical.indicator.power.Testing + org.ayatana.indicator.power.Testing Enable the mock battery: -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.Set \ - com.canonical.indicator.power.Testing \ + org.ayatana.indicator.power.Testing \ MockBatteryEnabled \ "<true>" Set the mock battery's charge to 10% -$ gdbus call --session --dest "com.canonical.indicator.power" \ - --object-path /com/canonical/indicator/power/Testing \ +$ gdbus call --session --dest "org.ayatana.indicator.power" \ + --object-path /org/ayatana/indicator/power/Testing \ --method org.freedesktop.DBus.Properties.Set \ - com.canonical.indicator.power.Testing \ + org.ayatana.indicator.power.Testing \ MockBatteryLevel \ "<uint32 10>" diff --git a/tests/test-device.cc b/tests/test-device.cc index e929f89..5ee9f1e 100644 --- a/tests/test-device.cc +++ b/tests/test-device.cc @@ -48,7 +48,7 @@ class DeviceTest : public ::testing::Test virtual void SetUp() { const GLogLevelFlags flags = GLogLevelFlags(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING); - log_handler_id = g_log_set_handler ("Indicator-Power", flags, log_count_func, this); + log_handler_id = g_log_set_handler ("Ayatana-Indicator-Power", flags, log_count_func, this); log_count_ipower_expected = 0; log_count_ipower_actual = 0; } @@ -56,7 +56,7 @@ class DeviceTest : public ::testing::Test virtual void TearDown() { ASSERT_EQ (log_count_ipower_expected, log_count_ipower_actual); - g_log_remove_handler ("Indicator-Power", log_handler_id); + g_log_remove_handler ("Ayatana-Indicator-Power", log_handler_id); } protected: diff --git a/tests/test-notify.cc b/tests/test-notify.cc index d056f3f..acab34f 100644 --- a/tests/test-notify.cc +++ b/tests/test-notify.cc @@ -61,7 +61,7 @@ protected: static constexpr int NOTIFICATION_CLOSED_API {3}; static constexpr int NOTIFICATION_CLOSED_UNDEFINED {4}; - static constexpr char const * APP_NAME {"indicator-power-service"}; + static constexpr char const * APP_NAME {"ayatana-indicator-power-service"}; static constexpr char const * METHOD_CLOSE {"CloseNotification"}; static constexpr char const * METHOD_NOTIFY {"Notify"}; @@ -69,7 +69,7 @@ protected: static constexpr char const * METHOD_GET_INFO {"GetServerInformation"}; static constexpr char const * SIGNAL_CLOSED {"NotificationClosed"}; - static constexpr char const * HINT_TIMEOUT {"x-canonical-snap-decisions-timeout"}; + static constexpr char const * HINT_TIMEOUT {"x-ayatana-snap-decisions-timeout"}; protected: |