aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-26 23:19:26 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-10-27 00:17:29 +0200
commite917d3a28a238208ecf786cfda93dcd2893e3df2 (patch)
tree7025063a06c7ba398ba64548d060c9a97e69210d /tests
parentba82b68035b55a7abbafc7d488e04f5ca9a3836c (diff)
downloadayatana-indicator-messages-e917d3a28a238208ecf786cfda93dcd2893e3df2.tar.gz
ayatana-indicator-messages-e917d3a28a238208ecf786cfda93dcd2893e3df2.tar.bz2
ayatana-indicator-messages-e917d3a28a238208ecf786cfda93dcd2893e3df2.zip
Fork from Ubuntu's Indicator Messages.
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am7
-rw-r--r--tests/accounts-service-mock.h2
-rw-r--r--tests/indicator-test.cpp18
-rwxr-xr-xtests/test-client.py6
-rw-r--r--tests/test-gactionmuxer.cpp10
5 files changed, 21 insertions, 22 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index bd559fd..7e23adc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,3 @@
-
CLEANFILES=
check_LTLIBRARIES = libgtest.la
check_PROGRAMS = test-gactionmuxer
@@ -47,7 +46,7 @@ indicator_test_SOURCES = \
indicator-test.cpp
indicator_test_CPPFLAGS = \
- -DINDICATOR_MESSAGES_SERVICE_BINARY="\"$(abs_top_builddir)/src/indicator-messages-service\"" \
+ -DINDICATOR_MESSAGES_SERVICE_BINARY="\"$(abs_top_builddir)/src/ayatana-indicator-messages-service\"" \
-DSCHEMA_DIR="\"$(SCHEMA_COMPILED_DIR)\"" \
-DXDG_DATA_DIRS="\"$(abs_srcdir)/\"" \
-I$(top_srcdir)/libmessaging-menu \
@@ -91,7 +90,7 @@ libindicator_messages_service_la_SOURCES = \
$(top_srcdir)/src/dbus-data.h
libindicator_messages_service_ladir = \
- $(includedir)/libindicator-messages-service/
+ $(includedir)/libayatana-indicator-messages-service/
libindicator_messages_service_la_CFLAGS = \
$(APPLET_CFLAGS) \
@@ -103,7 +102,7 @@ libindicator_messages_service_la_CFLAGS = \
-Wl,-z,defs \
-Wl,--as-needed \
-Werror -Wno-error=deprecated-declarations \
- -DG_LOG_DOMAIN=\"Indicator-Messages\"
+ -DG_LOG_DOMAIN=\"Ayatana-Indicator-Messages\"
libindicator_messages_service_la_LIBADD = \
$(APPLET_LIBS)
diff --git a/tests/accounts-service-mock.h b/tests/accounts-service-mock.h
index 301fcd4..268183a 100644
--- a/tests/accounts-service-mock.h
+++ b/tests/accounts-service-mock.h
@@ -60,7 +60,7 @@ class AccountsServiceMock
"SetXHasMessages", G_VARIANT_TYPE_BOOLEAN, nullptr,
"", NULL);
- soundobj = dbus_test_dbus_mock_get_object(mock, "/user", "com.canonical.indicator.sound.AccountsService", NULL);
+ soundobj = dbus_test_dbus_mock_get_object(mock, "/user", "org.ayatana.indicator.sound.AccountsService", NULL);
dbus_test_dbus_mock_object_add_property(mock, soundobj,
"Timestamp", G_VARIANT_TYPE_UINT64,
g_variant_new_uint64(0), NULL);
diff --git a/tests/indicator-test.cpp b/tests/indicator-test.cpp
index 0991db5..6c256fb 100644
--- a/tests/indicator-test.cpp
+++ b/tests/indicator-test.cpp
@@ -30,7 +30,7 @@ class IndicatorTest : public IndicatorFixture
{
protected:
IndicatorTest (void) :
- IndicatorFixture(INDICATOR_MESSAGES_SERVICE_BINARY, "com.canonical.indicator.messages")
+ IndicatorFixture(INDICATOR_MESSAGES_SERVICE_BINARY, "org.ayatana.indicator.messages")
{
}
@@ -60,7 +60,7 @@ protected:
TEST_F(IndicatorTest, RootAction) {
- setActions("/com/canonical/indicator/messages");
+ setActions("/org/ayatana/indicator/messages");
EXPECT_EVENTUALLY_ACTION_EXISTS("messages");
EXPECT_ACTION_STATE_TYPE("messages", G_VARIANT_TYPE("a{sv}"));
@@ -68,7 +68,7 @@ TEST_F(IndicatorTest, RootAction) {
}
TEST_F(IndicatorTest, SingleMessage) {
- setActions("/com/canonical/indicator/messages");
+ setActions("/org/ayatana/indicator/messages");
auto app = std::shared_ptr<MessagingMenuApp>(messaging_menu_app_new("test.desktop"), [](MessagingMenuApp * app) { g_clear_object(&app); });
ASSERT_NE(nullptr, app);
@@ -87,9 +87,9 @@ TEST_F(IndicatorTest, SingleMessage) {
EXPECT_EVENTUALLY_ACTION_EXISTS("test.msg.testid");
- setMenu("/com/canonical/indicator/messages/phone");
+ setMenu("/org/ayatana/indicator/messages/phone");
- EXPECT_EVENTUALLY_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-type", "com.canonical.indicator.messages.messageitem");
+ EXPECT_EVENTUALLY_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-type", "org.ayatana.indicator.messages.messageitem");
EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "label", "Test Title");
EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-message-id", "testid");
EXPECT_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-subtitle", "A subtitle too");
@@ -103,7 +103,7 @@ messageReplyActivate (GObject * obj, gchar * name, GVariant * value, gpointer us
}
TEST_F(IndicatorTest, MessageReply) {
- setActions("/com/canonical/indicator/messages");
+ setActions("/org/ayatana/indicator/messages");
auto app = std::shared_ptr<MessagingMenuApp>(messaging_menu_app_new("test.desktop"), [](MessagingMenuApp * app) { g_clear_object(&app); });
ASSERT_NE(nullptr, app);
@@ -131,9 +131,9 @@ TEST_F(IndicatorTest, MessageReply) {
EXPECT_ACTION_ENABLED("remove-all", true);
- setMenu("/com/canonical/indicator/messages/phone");
+ setMenu("/org/ayatana/indicator/messages/phone");
- EXPECT_EVENTUALLY_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-type", "com.canonical.indicator.messages.messageitem");
+ EXPECT_EVENTUALLY_MENU_ATTRIB(std::vector<int>({0, 0, 0}), "x-canonical-type", "org.ayatana.indicator.messages.messageitem");
std::string activateResponse;
g_signal_connect(msg.get(), "activate", G_CALLBACK(messageReplyActivate), &activateResponse);
@@ -149,7 +149,7 @@ TEST_F(IndicatorTest, IconNotification) {
auto normalicon = std::shared_ptr<GVariant>(g_variant_ref_sink(g_variant_new_parsed("{'icon': <('themed', <['indicator-messages-offline', 'indicator-messages', 'indicator']>)>, 'title': <'Notifications'>, 'accessible-desc': <'Messages'>, 'visible': <true>}")), [](GVariant *var) {if (var != nullptr) g_variant_unref(var); });
auto blueicon = std::shared_ptr<GVariant>(g_variant_ref_sink(g_variant_new_parsed("{'icon': <('themed', <['indicator-messages-new-offline', 'indicator-messages-new', 'indicator-messages', 'indicator']>)>, 'title': <'Notifications'>, 'accessible-desc': <'New Messages'>, 'visible': <true>}")), [](GVariant *var) {if (var != nullptr) g_variant_unref(var); });
- setActions("/com/canonical/indicator/messages");
+ setActions("/org/ayatana/indicator/messages");
auto app = std::shared_ptr<MessagingMenuApp>(messaging_menu_app_new("test.desktop"), [](MessagingMenuApp * app) { g_clear_object(&app); });
ASSERT_NE(nullptr, app);
diff --git a/tests/test-client.py b/tests/test-client.py
index 0dbf868..5baa795 100755
--- a/tests/test-client.py
+++ b/tests/test-client.py
@@ -16,9 +16,9 @@ class MessagingMenuTest(dbusmock.DBusTestCase):
klass.bus = klass.get_dbus(False)
def setUp(self):
- name = 'com.canonical.indicator.messages'
- obj_path = '/com/canonical/indicator/messages/service'
- iface = 'com.canonical.indicator.messages.service'
+ name = 'org.ayatana.indicator.messages'
+ obj_path = '/org/ayatana/indicator/messages/service'
+ iface = 'org.ayatana.indicator.messages.service'
self.messaging_service = self.spawn_server(name, obj_path, iface, stdout=subprocess.PIPE)
self.mock = dbus.Interface(self.bus.get_object(name, obj_path), dbusmock.MOCK_IFACE)
diff --git a/tests/test-gactionmuxer.cpp b/tests/test-gactionmuxer.cpp
index 5c98c90..f11f50d 100644
--- a/tests/test-gactionmuxer.cpp
+++ b/tests/test-gactionmuxer.cpp
@@ -46,11 +46,11 @@ TEST(GActionMuxerTest, Sanity) {
g_type_init ();
#endif
- g_test_expect_message ("Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*G_IS_ACTION_MUXER*");
+ g_test_expect_message ("Ayatana-Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*G_IS_ACTION_MUXER*");
g_action_muxer_insert (NULL, NULL, NULL);
g_test_assert_expected_messages ();
- g_test_expect_message ("Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*G_IS_ACTION_MUXER*");
+ g_test_expect_message ("Ayatana-Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*G_IS_ACTION_MUXER*");
g_action_muxer_remove (NULL, NULL);
g_test_assert_expected_messages ();
@@ -59,15 +59,15 @@ TEST(GActionMuxerTest, Sanity) {
g_action_muxer_insert (muxer, NULL, NULL);
g_action_muxer_remove (muxer, NULL);
- g_test_expect_message ("Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
+ g_test_expect_message ("Ayatana-Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
EXPECT_FALSE (g_action_group_has_action (G_ACTION_GROUP (muxer), NULL));
g_test_assert_expected_messages ();
- g_test_expect_message ("Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
+ g_test_expect_message ("Ayatana-Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
EXPECT_FALSE (g_action_group_get_action_enabled (G_ACTION_GROUP (muxer), NULL));
g_test_assert_expected_messages ();
- g_test_expect_message ("Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
+ g_test_expect_message ("Ayatana-Indicator-Messages", G_LOG_LEVEL_CRITICAL, "*NULL*");
EXPECT_FALSE (g_action_group_query_action (G_ACTION_GROUP (muxer), NULL, NULL, NULL, NULL, NULL, NULL));
g_test_assert_expected_messages ();