aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-07 11:33:03 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-07 11:33:03 -0400
commit12cc75fba26176cef0eb2ed8b98d0b377e10519f (patch)
treeac3e6cbb55a0fd8d303c2165df65c36ef5365ef9 /tests
parent060711f83ffb9fbcb85410ee9cb045b9c4d8d47c (diff)
parent0d3ebcb5cf74eef75f2153400b7b8a1d450573a5 (diff)
downloadlibayatana-indicator-12cc75fba26176cef0eb2ed8b98d0b377e10519f.tar.gz
libayatana-indicator-12cc75fba26176cef0eb2ed8b98d0b377e10519f.tar.bz2
libayatana-indicator-12cc75fba26176cef0eb2ed8b98d0b377e10519f.zip
Merge lp:~larsu/new-indicator-file-format
IndicatorNg: update indicator file format The old file format had some shortcomings: (1) It was impossible to efficiently reuse a menu for different profiles, because the profile name was implicit in the object path. The only way to do this was to export the same menu twice. Now, object paths have to be set explicitly in the indicator file. (2) The well-known dbus name of a service and the name of its service file were similar but slightly different (com.canonical.indicator.test vs com.canonical.test.indicator), which caused some confusion on when to use which. Now, the file name *is* the bus name, and the `BusName` key has been dropped. The new file format is documented in README.
Diffstat (limited to 'tests')
-rw-r--r--tests/com.canonical.indicator.no-such-service (renamed from tests/com.canonical.test.indicator)1
-rw-r--r--tests/com.canonical.indicator.test (renamed from tests/com.canonical.test.nosuchservice.indicator)4
-rw-r--r--tests/test-indicator-ng.c10
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/com.canonical.test.indicator b/tests/com.canonical.indicator.no-such-service
index dad4c94..54cc4fd 100644
--- a/tests/com.canonical.test.indicator
+++ b/tests/com.canonical.indicator.no-such-service
@@ -1,4 +1,3 @@
[Indicator Service]
Name=indicator-test
-BusName=com.canonical.indicator.test
ObjectPath=/com/canonical/indicator/test
diff --git a/tests/com.canonical.test.nosuchservice.indicator b/tests/com.canonical.indicator.test
index 8464749..0c7122f 100644
--- a/tests/com.canonical.test.nosuchservice.indicator
+++ b/tests/com.canonical.indicator.test
@@ -1,4 +1,6 @@
[Indicator Service]
Name=indicator-test
-BusName=com.canonical.indicator.test.nosuchservice
ObjectPath=/com/canonical/indicator/test
+
+[desktop]
+ObjectPath=/com/canonical/indicator/test/desktop
diff --git a/tests/test-indicator-ng.c b/tests/test-indicator-ng.c
index 150cc37..7b677d3 100644
--- a/tests/test-indicator-ng.c
+++ b/tests/test-indicator-ng.c
@@ -50,11 +50,11 @@ test_instantiation (void)
GError *error = NULL;
GMainLoop *loop;
- indicator = indicator_ng_new (SRCDIR "/com.canonical.test.nosuchservice.indicator", &error);
+ indicator = indicator_ng_new (SRCDIR "/com.canonical.indicator.no-such-service", &error);
g_assert (indicator);
g_assert (error == NULL);
- g_assert_cmpstr (indicator_ng_get_service_file (indicator), ==, SRCDIR "/com.canonical.test.nosuchservice.indicator");
+ g_assert_cmpstr (indicator_ng_get_service_file (indicator), ==, SRCDIR "/com.canonical.indicator.no-such-service");
g_assert_cmpstr (indicator_ng_get_profile (indicator), ==, "desktop");
{
@@ -65,7 +65,7 @@ test_instantiation (void)
"profile", &profile,
NULL);
- g_assert_cmpstr (service_file, ==, SRCDIR "/com.canonical.test.nosuchservice.indicator");
+ g_assert_cmpstr (service_file, ==, SRCDIR "/com.canonical.indicator.no-such-service");
g_assert_cmpstr (profile, ==, "desktop");
g_free (service_file);
@@ -89,7 +89,7 @@ test_instantiation_with_profile (void)
IndicatorNg *indicator;
GError *error = NULL;
- indicator = indicator_ng_new_for_profile (SRCDIR "/com.canonical.test.indicator", "greeter", &error);
+ indicator = indicator_ng_new_for_profile (SRCDIR "/com.canonical.indicator.test", "greeter", &error);
g_assert (indicator);
g_assert (error == NULL);
@@ -107,7 +107,7 @@ test_menu (void)
GList *entries;
IndicatorObjectEntry *entry;
- indicator = indicator_ng_new (SRCDIR "/com.canonical.test.indicator", &error);
+ indicator = indicator_ng_new (SRCDIR "/com.canonical.indicator.test", &error);
g_assert (indicator);
g_assert (error == NULL);