Merge lp:~ted/url-dispatcher/ubuntu-app-launch into lp:url-dispatcher/14.10
- ubuntu-app-launch
- Merge into trunk.14.10
Proposed by
Ted Gould
Status: | Merged |
---|---|
Approved by: | Ted Gould |
Approved revision: | 53 |
Merged at revision: | 52 |
Proposed branch: | lp:~ted/url-dispatcher/ubuntu-app-launch |
Merge into: | lp:url-dispatcher/14.10 |
Diff against target: |
416 lines (+69/-69) 10 files modified
CMakeLists.txt (+2/-2) debian/control (+2/-2) service/CMakeLists.txt (+1/-1) service/dispatcher.c (+4/-4) tests/CMakeLists.txt (+5/-5) tests/app-id-test.cc (+26/-26) tests/dispatcher-test.cc (+20/-20) tests/service-test.cc (+1/-1) tests/ubuntu-app-launch-mock.c (+6/-6) tests/ubuntu-app-launch-mock.h (+2/-2) |
To merge this branch: | bzr merge lp:~ted/url-dispatcher/ubuntu-app-launch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Charles Kerr (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+220955@code.launchpad.net |
Commit message
Changing to Ubuntu App Launch
Description of the change
We have a name
To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
review:
Needs Fixing
(continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:53
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
review:
Needs Fixing
(continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote : | # |
Jenkins won't be happy with this without the rest of the train.
The code looks alright; approving despite Jenkins' disapproval.
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'CMakeLists.txt' | |||
2 | --- CMakeLists.txt 2014-01-08 22:30:15 +0000 | |||
3 | +++ CMakeLists.txt 2014-05-26 13:09:13 +0000 | |||
4 | @@ -29,8 +29,8 @@ | |||
5 | 29 | 29 | ||
6 | 30 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") | 30 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror") |
7 | 31 | 31 | ||
10 | 32 | pkg_check_modules(UPSTART_APP_LAUNCH REQUIRED upstart-app-launch-2) | 32 | pkg_check_modules(UBUNTU_APP_LAUNCH REQUIRED ubuntu-app-launch-2) |
11 | 33 | include_directories(${UPSTART_APP_LAUNCH_INCLUDE_DIRS}) | 33 | include_directories(${UBUNTU_APP_LAUNCH_INCLUDE_DIRS}) |
12 | 34 | 34 | ||
13 | 35 | pkg_check_modules(GLIB2 REQUIRED glib-2.0) | 35 | pkg_check_modules(GLIB2 REQUIRED glib-2.0) |
14 | 36 | include_directories(${GLIB2_INCLUDE_DIRS}) | 36 | include_directories(${GLIB2_INCLUDE_DIRS}) |
15 | 37 | 37 | ||
16 | === modified file 'debian/control' | |||
17 | --- debian/control 2014-01-29 14:55:59 +0000 | |||
18 | +++ debian/control 2014-05-26 13:09:13 +0000 | |||
19 | @@ -15,7 +15,7 @@ | |||
20 | 15 | libjson-glib-dev, | 15 | libjson-glib-dev, |
21 | 16 | libgtest-dev, | 16 | libgtest-dev, |
22 | 17 | libsqlite3-dev, | 17 | libsqlite3-dev, |
24 | 18 | libupstart-app-launch2-dev (>= 0.3), | 18 | libubuntu-app-launch2-dev (>= 0.3), |
25 | 19 | python, | 19 | python, |
26 | 20 | python3-dbusmock, | 20 | python3-dbusmock, |
27 | 21 | sqlite3, | 21 | sqlite3, |
28 | @@ -31,7 +31,7 @@ | |||
29 | 31 | Architecture: any | 31 | Architecture: any |
30 | 32 | Multi-Arch: same | 32 | Multi-Arch: same |
31 | 33 | Pre-Depends: ${misc:Pre-Depends}, | 33 | Pre-Depends: ${misc:Pre-Depends}, |
33 | 34 | Depends: upstart-app-launch, | 34 | Depends: ubuntu-app-launch, |
34 | 35 | ${misc:Depends}, | 35 | ${misc:Depends}, |
35 | 36 | ${shlibs:Depends}, | 36 | ${shlibs:Depends}, |
36 | 37 | Description: service to allow sending of URLs and get handlers started | 37 | Description: service to allow sending of URLs and get handlers started |
37 | 38 | 38 | ||
38 | === modified file 'service/CMakeLists.txt' | |||
39 | --- service/CMakeLists.txt 2014-03-14 19:47:07 +0000 | |||
40 | +++ service/CMakeLists.txt 2014-05-26 13:09:13 +0000 | |||
41 | @@ -84,7 +84,7 @@ | |||
42 | 84 | 84 | ||
43 | 85 | set_target_properties(service-exec PROPERTIES OUTPUT_NAME "url-dispatcher") | 85 | set_target_properties(service-exec PROPERTIES OUTPUT_NAME "url-dispatcher") |
44 | 86 | 86 | ||
46 | 87 | target_link_libraries(service-exec dispatcher-lib ${UPSTART_APP_LAUNCH_LIBRARIES}) | 87 | target_link_libraries(service-exec dispatcher-lib ${UBUNTU_APP_LAUNCH_LIBRARIES}) |
47 | 88 | 88 | ||
48 | 89 | ########################### | 89 | ########################### |
49 | 90 | # Update Directory | 90 | # Update Directory |
50 | 91 | 91 | ||
51 | === modified file 'service/dispatcher.c' | |||
52 | --- service/dispatcher.c 2014-03-14 19:51:28 +0000 | |||
53 | +++ service/dispatcher.c 2014-05-26 13:09:13 +0000 | |||
54 | @@ -19,7 +19,7 @@ | |||
55 | 19 | 19 | ||
56 | 20 | #include <gio/gio.h> | 20 | #include <gio/gio.h> |
57 | 21 | #include <json-glib/json-glib.h> | 21 | #include <json-glib/json-glib.h> |
59 | 22 | #include <upstart-app-launch.h> | 22 | #include <ubuntu-app-launch.h> |
60 | 23 | #include "dispatcher.h" | 23 | #include "dispatcher.h" |
61 | 24 | #include "service-iface.h" | 24 | #include "service-iface.h" |
62 | 25 | #include "recoverable-problem.h" | 25 | #include "recoverable-problem.h" |
63 | @@ -131,7 +131,7 @@ | |||
64 | 131 | NULL | 131 | NULL |
65 | 132 | }; | 132 | }; |
66 | 133 | 133 | ||
68 | 134 | if (!upstart_app_launch_start_application(app_id, urls)) { | 134 | if (!ubuntu_app_launch_start_application(app_id, urls)) { |
69 | 135 | g_warning("Unable to start application '%s' with URL '%s'", app_id, url); | 135 | g_warning("Unable to start application '%s' with URL '%s'", app_id, url); |
70 | 136 | } | 136 | } |
71 | 137 | 137 | ||
72 | @@ -170,7 +170,7 @@ | |||
73 | 170 | gchar * appid = NULL; | 170 | gchar * appid = NULL; |
74 | 171 | gboolean retval = FALSE; | 171 | gboolean retval = FALSE; |
75 | 172 | 172 | ||
77 | 173 | appid = upstart_app_launch_triplet_to_app_id(package, app, version); | 173 | appid = ubuntu_app_launch_triplet_to_app_id(package, app, version); |
78 | 174 | if (appid != NULL) { | 174 | if (appid != NULL) { |
79 | 175 | pass_url_to_app(appid, NULL); | 175 | pass_url_to_app(appid, NULL); |
80 | 176 | retval = TRUE; | 176 | retval = TRUE; |
81 | @@ -205,7 +205,7 @@ | |||
82 | 205 | gboolean retval = FALSE; | 205 | gboolean retval = FALSE; |
83 | 206 | gchar * appid = NULL; | 206 | gchar * appid = NULL; |
84 | 207 | 207 | ||
86 | 208 | appid = upstart_app_launch_triplet_to_app_id("com.ubuntu.music", "music", NULL); | 208 | appid = ubuntu_app_launch_triplet_to_app_id("com.ubuntu.music", "music", NULL); |
87 | 209 | if (appid != NULL) { | 209 | if (appid != NULL) { |
88 | 210 | pass_url_to_app(appid, url); | 210 | pass_url_to_app(appid, url); |
89 | 211 | retval = TRUE; | 211 | retval = TRUE; |
90 | 212 | 212 | ||
91 | === modified file 'tests/CMakeLists.txt' | |||
92 | --- tests/CMakeLists.txt 2014-03-24 20:37:42 +0000 | |||
93 | +++ tests/CMakeLists.txt 2014-05-26 13:09:13 +0000 | |||
94 | @@ -25,8 +25,8 @@ | |||
95 | 25 | 25 | ||
96 | 26 | add_library(mock-lib STATIC | 26 | add_library(mock-lib STATIC |
97 | 27 | recoverable-problem-mock.c | 27 | recoverable-problem-mock.c |
100 | 28 | upstart-app-launch-mock.h | 28 | ubuntu-app-launch-mock.h |
101 | 29 | upstart-app-launch-mock.c) | 29 | ubuntu-app-launch-mock.c) |
102 | 30 | 30 | ||
103 | 31 | target_link_libraries(mock-lib | 31 | target_link_libraries(mock-lib |
104 | 32 | ${GLIB2_LIBRARIES} | 32 | ${GLIB2_LIBRARIES} |
105 | @@ -43,7 +43,7 @@ | |||
106 | 43 | dispatcher-lib | 43 | dispatcher-lib |
107 | 44 | mock-lib | 44 | mock-lib |
108 | 45 | gtest | 45 | gtest |
110 | 46 | ${UPSTART_APP_LAUNCH_LIBRARIES} | 46 | ${UBUNTU_APP_LAUNCH_LIBRARIES} |
111 | 47 | ${GTEST_LIBS}) | 47 | ${GTEST_LIBS}) |
112 | 48 | 48 | ||
113 | 49 | add_test (dispatcher-test dispatcher-test) | 49 | add_test (dispatcher-test dispatcher-test) |
114 | @@ -62,7 +62,7 @@ | |||
115 | 62 | dispatcher-lib | 62 | dispatcher-lib |
116 | 63 | mock-lib | 63 | mock-lib |
117 | 64 | gtest | 64 | gtest |
119 | 65 | ${UPSTART_APP_LAUNCH_LIBRARIES} | 65 | ${UBUNTU_APP_LAUNCH_LIBRARIES} |
120 | 66 | ${GTEST_LIBS}) | 66 | ${GTEST_LIBS}) |
121 | 67 | 67 | ||
122 | 68 | add_test (app-id-test app-id-test) | 68 | add_test (app-id-test app-id-test) |
123 | @@ -91,7 +91,7 @@ | |||
124 | 91 | dispatcher | 91 | dispatcher |
125 | 92 | gtest | 92 | gtest |
126 | 93 | ${DBUSTEST_LIBRARIES} | 93 | ${DBUSTEST_LIBRARIES} |
128 | 94 | ${UPSTART_APP_LAUNCH_LIBRARIES} | 94 | ${UBUNTU_APP_LAUNCH_LIBRARIES} |
129 | 95 | ${GTEST_LIBS}) | 95 | ${GTEST_LIBS}) |
130 | 96 | 96 | ||
131 | 97 | add_test (service-test service-test) | 97 | add_test (service-test service-test) |
132 | 98 | 98 | ||
133 | === modified file 'tests/app-id-test.cc' | |||
134 | --- tests/app-id-test.cc 2014-03-24 20:43:29 +0000 | |||
135 | +++ tests/app-id-test.cc 2014-05-26 13:09:13 +0000 | |||
136 | @@ -19,7 +19,7 @@ | |||
137 | 19 | #include <gio/gio.h> | 19 | #include <gio/gio.h> |
138 | 20 | #include <gtest/gtest.h> | 20 | #include <gtest/gtest.h> |
139 | 21 | #include "dispatcher.h" | 21 | #include "dispatcher.h" |
141 | 22 | #include "upstart-app-launch-mock.h" | 22 | #include "ubuntu-app-launch-mock.h" |
142 | 23 | 23 | ||
143 | 24 | class AppIdTest : public ::testing::Test | 24 | class AppIdTest : public ::testing::Test |
144 | 25 | { | 25 | { |
145 | @@ -55,7 +55,7 @@ | |||
146 | 55 | 55 | ||
147 | 56 | g_main_loop_unref(mainloop); | 56 | g_main_loop_unref(mainloop); |
148 | 57 | 57 | ||
150 | 58 | upstart_app_launch_mock_clear_last_app_id(); | 58 | ubuntu_app_launch_mock_clear_last_app_id(); |
151 | 59 | 59 | ||
152 | 60 | g_test_dbus_down(testbus); | 60 | g_test_dbus_down(testbus); |
153 | 61 | g_object_unref(testbus); | 61 | g_object_unref(testbus); |
154 | @@ -72,41 +72,41 @@ | |||
155 | 72 | { | 72 | { |
156 | 73 | /* Good sanity check */ | 73 | /* Good sanity check */ |
157 | 74 | dispatch_url("appid://com.test.good/app1/1.2.3"); | 74 | dispatch_url("appid://com.test.good/app1/1.2.3"); |
160 | 75 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 75 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
161 | 76 | upstart_app_launch_mock_clear_last_app_id(); | 76 | ubuntu_app_launch_mock_clear_last_app_id(); |
162 | 77 | 77 | ||
163 | 78 | /* No version at all */ | 78 | /* No version at all */ |
164 | 79 | dispatch_url("appid://com.test.good/app1"); | 79 | dispatch_url("appid://com.test.good/app1"); |
167 | 80 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 80 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
168 | 81 | upstart_app_launch_mock_clear_last_app_id(); | 81 | ubuntu_app_launch_mock_clear_last_app_id(); |
169 | 82 | } | 82 | } |
170 | 83 | 83 | ||
171 | 84 | TEST_F(AppIdTest, WildcardUrl) | 84 | TEST_F(AppIdTest, WildcardUrl) |
172 | 85 | { | 85 | { |
173 | 86 | /* Version wildcard */ | 86 | /* Version wildcard */ |
174 | 87 | dispatch_url("appid://com.test.good/app1/current-user-version"); | 87 | dispatch_url("appid://com.test.good/app1/current-user-version"); |
177 | 88 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 88 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
178 | 89 | upstart_app_launch_mock_clear_last_app_id(); | 89 | ubuntu_app_launch_mock_clear_last_app_id(); |
179 | 90 | 90 | ||
180 | 91 | /* First app */ | 91 | /* First app */ |
181 | 92 | dispatch_url("appid://com.test.good/first-listed-app/current-user-version"); | 92 | dispatch_url("appid://com.test.good/first-listed-app/current-user-version"); |
184 | 93 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 93 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
185 | 94 | upstart_app_launch_mock_clear_last_app_id(); | 94 | ubuntu_app_launch_mock_clear_last_app_id(); |
186 | 95 | 95 | ||
187 | 96 | /* Last app */ | 96 | /* Last app */ |
188 | 97 | dispatch_url("appid://com.test.good/last-listed-app/current-user-version"); | 97 | dispatch_url("appid://com.test.good/last-listed-app/current-user-version"); |
191 | 98 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 98 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
192 | 99 | upstart_app_launch_mock_clear_last_app_id(); | 99 | ubuntu_app_launch_mock_clear_last_app_id(); |
193 | 100 | 100 | ||
194 | 101 | /* Only app */ | 101 | /* Only app */ |
195 | 102 | dispatch_url("appid://com.test.good/only-listed-app/current-user-version"); | 102 | dispatch_url("appid://com.test.good/only-listed-app/current-user-version"); |
198 | 103 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 103 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
199 | 104 | upstart_app_launch_mock_clear_last_app_id(); | 104 | ubuntu_app_launch_mock_clear_last_app_id(); |
200 | 105 | 105 | ||
201 | 106 | /* Wild app fixed version */ | 106 | /* Wild app fixed version */ |
202 | 107 | dispatch_url("appid://com.test.good/only-listed-app/1.2.3"); | 107 | dispatch_url("appid://com.test.good/only-listed-app/1.2.3"); |
205 | 108 | ASSERT_STREQ("com.test.good_app1_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 108 | ASSERT_STREQ("com.test.good_app1_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
206 | 109 | upstart_app_launch_mock_clear_last_app_id(); | 109 | ubuntu_app_launch_mock_clear_last_app_id(); |
207 | 110 | 110 | ||
208 | 111 | return; | 111 | return; |
209 | 112 | } | 112 | } |
210 | @@ -114,16 +114,16 @@ | |||
211 | 114 | TEST_F(AppIdTest, OrderingUrl) | 114 | TEST_F(AppIdTest, OrderingUrl) |
212 | 115 | { | 115 | { |
213 | 116 | dispatch_url("appid://com.test.multiple/first-listed-app/current-user-version"); | 116 | dispatch_url("appid://com.test.multiple/first-listed-app/current-user-version"); |
216 | 117 | ASSERT_STREQ("com.test.multiple_app-first_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 117 | ASSERT_STREQ("com.test.multiple_app-first_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
217 | 118 | upstart_app_launch_mock_clear_last_app_id(); | 118 | ubuntu_app_launch_mock_clear_last_app_id(); |
218 | 119 | 119 | ||
219 | 120 | dispatch_url("appid://com.test.multiple/last-listed-app/current-user-version"); | 120 | dispatch_url("appid://com.test.multiple/last-listed-app/current-user-version"); |
222 | 121 | ASSERT_STREQ("com.test.multiple_app-last_1.2.3", upstart_app_launch_mock_get_last_app_id()); | 121 | ASSERT_STREQ("com.test.multiple_app-last_1.2.3", ubuntu_app_launch_mock_get_last_app_id()); |
223 | 122 | upstart_app_launch_mock_clear_last_app_id(); | 122 | ubuntu_app_launch_mock_clear_last_app_id(); |
224 | 123 | 123 | ||
225 | 124 | dispatch_url("appid://com.test.multiple/only-listed-app/current-user-version"); | 124 | dispatch_url("appid://com.test.multiple/only-listed-app/current-user-version"); |
228 | 125 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 125 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
229 | 126 | upstart_app_launch_mock_clear_last_app_id(); | 126 | ubuntu_app_launch_mock_clear_last_app_id(); |
230 | 127 | 127 | ||
231 | 128 | return; | 128 | return; |
232 | 129 | } | 129 | } |
233 | @@ -133,8 +133,8 @@ | |||
234 | 133 | g_setenv("TEST_CLICK_DB", "not-click-db", TRUE); | 133 | g_setenv("TEST_CLICK_DB", "not-click-db", TRUE); |
235 | 134 | 134 | ||
236 | 135 | dispatch_url("appid://com.test.good/app1/current-user-version"); | 135 | dispatch_url("appid://com.test.good/app1/current-user-version"); |
239 | 136 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 136 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
240 | 137 | upstart_app_launch_mock_clear_last_app_id(); | 137 | ubuntu_app_launch_mock_clear_last_app_id(); |
241 | 138 | 138 | ||
242 | 139 | return; | 139 | return; |
243 | 140 | } | 140 | } |
244 | @@ -144,6 +144,6 @@ | |||
245 | 144 | g_setenv("TEST_CLICK_USER", "not-test-user", TRUE); | 144 | g_setenv("TEST_CLICK_USER", "not-test-user", TRUE); |
246 | 145 | 145 | ||
247 | 146 | dispatch_url("appid://com.test.good/app1/current-user-version"); | 146 | dispatch_url("appid://com.test.good/app1/current-user-version"); |
250 | 147 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 147 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
251 | 148 | upstart_app_launch_mock_clear_last_app_id(); | 148 | ubuntu_app_launch_mock_clear_last_app_id(); |
252 | 149 | } | 149 | } |
253 | 150 | 150 | ||
254 | === modified file 'tests/dispatcher-test.cc' | |||
255 | --- tests/dispatcher-test.cc 2014-03-31 17:17:07 +0000 | |||
256 | +++ tests/dispatcher-test.cc 2014-05-26 13:09:13 +0000 | |||
257 | @@ -19,7 +19,7 @@ | |||
258 | 19 | #include <gio/gio.h> | 19 | #include <gio/gio.h> |
259 | 20 | #include <gtest/gtest.h> | 20 | #include <gtest/gtest.h> |
260 | 21 | #include "dispatcher.h" | 21 | #include "dispatcher.h" |
262 | 22 | #include "upstart-app-launch-mock.h" | 22 | #include "ubuntu-app-launch-mock.h" |
263 | 23 | #include "url-db.h" | 23 | #include "url-db.h" |
264 | 24 | 24 | ||
265 | 25 | class DispatcherTest : public ::testing::Test | 25 | class DispatcherTest : public ::testing::Test |
266 | @@ -64,7 +64,7 @@ | |||
267 | 64 | 64 | ||
268 | 65 | g_main_loop_unref(mainloop); | 65 | g_main_loop_unref(mainloop); |
269 | 66 | 66 | ||
271 | 67 | upstart_app_launch_mock_clear_last_app_id(); | 67 | ubuntu_app_launch_mock_clear_last_app_id(); |
272 | 68 | 68 | ||
273 | 69 | /* let other threads settle */ | 69 | /* let other threads settle */ |
274 | 70 | g_usleep(500000); | 70 | g_usleep(500000); |
275 | @@ -84,28 +84,28 @@ | |||
276 | 84 | { | 84 | { |
277 | 85 | /* Good sanity check */ | 85 | /* Good sanity check */ |
278 | 86 | dispatch_url("application:///foo.desktop"); | 86 | dispatch_url("application:///foo.desktop"); |
281 | 87 | ASSERT_STREQ("foo", upstart_app_launch_mock_get_last_app_id()); | 87 | ASSERT_STREQ("foo", ubuntu_app_launch_mock_get_last_app_id()); |
282 | 88 | upstart_app_launch_mock_clear_last_app_id(); | 88 | ubuntu_app_launch_mock_clear_last_app_id(); |
283 | 89 | 89 | ||
284 | 90 | /* No .desktop */ | 90 | /* No .desktop */ |
285 | 91 | dispatch_url("application:///foo"); | 91 | dispatch_url("application:///foo"); |
288 | 92 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 92 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
289 | 93 | upstart_app_launch_mock_clear_last_app_id(); | 93 | ubuntu_app_launch_mock_clear_last_app_id(); |
290 | 94 | 94 | ||
291 | 95 | /* Missing a / */ | 95 | /* Missing a / */ |
292 | 96 | dispatch_url("application://foo.desktop"); | 96 | dispatch_url("application://foo.desktop"); |
295 | 97 | ASSERT_TRUE(NULL == upstart_app_launch_mock_get_last_app_id()); | 97 | ASSERT_TRUE(NULL == ubuntu_app_launch_mock_get_last_app_id()); |
296 | 98 | upstart_app_launch_mock_clear_last_app_id(); | 98 | ubuntu_app_launch_mock_clear_last_app_id(); |
297 | 99 | 99 | ||
298 | 100 | /* Good with hyphens */ | 100 | /* Good with hyphens */ |
299 | 101 | dispatch_url("application:///my-really-cool-app.desktop"); | 101 | dispatch_url("application:///my-really-cool-app.desktop"); |
302 | 102 | ASSERT_STREQ("my-really-cool-app", upstart_app_launch_mock_get_last_app_id()); | 102 | ASSERT_STREQ("my-really-cool-app", ubuntu_app_launch_mock_get_last_app_id()); |
303 | 103 | upstart_app_launch_mock_clear_last_app_id(); | 103 | ubuntu_app_launch_mock_clear_last_app_id(); |
304 | 104 | 104 | ||
305 | 105 | /* Good Click Style */ | 105 | /* Good Click Style */ |
306 | 106 | dispatch_url("application:///com.test.foo_bar-app_0.3.4.desktop"); | 106 | dispatch_url("application:///com.test.foo_bar-app_0.3.4.desktop"); |
309 | 107 | ASSERT_STREQ("com.test.foo_bar-app_0.3.4", upstart_app_launch_mock_get_last_app_id()); | 107 | ASSERT_STREQ("com.test.foo_bar-app_0.3.4", ubuntu_app_launch_mock_get_last_app_id()); |
310 | 108 | upstart_app_launch_mock_clear_last_app_id(); | 108 | ubuntu_app_launch_mock_clear_last_app_id(); |
311 | 109 | 109 | ||
312 | 110 | return; | 110 | return; |
313 | 111 | } | 111 | } |
314 | @@ -114,13 +114,13 @@ | |||
315 | 114 | { | 114 | { |
316 | 115 | /* Base Calendar */ | 115 | /* Base Calendar */ |
317 | 116 | dispatch_url("calendar:///?starttime=196311221830Z"); | 116 | dispatch_url("calendar:///?starttime=196311221830Z"); |
320 | 117 | ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", upstart_app_launch_mock_get_last_app_id()); | 117 | ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", ubuntu_app_launch_mock_get_last_app_id()); |
321 | 118 | upstart_app_launch_mock_clear_last_app_id(); | 118 | ubuntu_app_launch_mock_clear_last_app_id(); |
322 | 119 | 119 | ||
323 | 120 | /* Two Slash, nothing else */ | 120 | /* Two Slash, nothing else */ |
324 | 121 | dispatch_url("calendar://"); | 121 | dispatch_url("calendar://"); |
327 | 122 | ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", upstart_app_launch_mock_get_last_app_id()); | 122 | ASSERT_STREQ("com.ubuntu.calendar_calendar_9.8.2343", ubuntu_app_launch_mock_get_last_app_id()); |
328 | 123 | upstart_app_launch_mock_clear_last_app_id(); | 123 | ubuntu_app_launch_mock_clear_last_app_id(); |
329 | 124 | 124 | ||
330 | 125 | return; | 125 | return; |
331 | 126 | } | 126 | } |
332 | @@ -130,13 +130,13 @@ | |||
333 | 130 | { | 130 | { |
334 | 131 | /* File Video */ | 131 | /* File Video */ |
335 | 132 | dispatch_url("file:///home/bar/Videos/foo.mp4"); | 132 | dispatch_url("file:///home/bar/Videos/foo.mp4"); |
338 | 133 | ASSERT_STREQ("mediaplayer-app", upstart_app_launch_mock_get_last_app_id()); | 133 | ASSERT_STREQ("mediaplayer-app", ubuntu_app_launch_mock_get_last_app_id()); |
339 | 134 | upstart_app_launch_mock_clear_last_app_id(); | 134 | ubuntu_app_launch_mock_clear_last_app_id(); |
340 | 135 | 135 | ||
341 | 136 | /* File Video */ | 136 | /* File Video */ |
342 | 137 | dispatch_url("file:///home/bar/Music/The_Bars_Live.mp3"); | 137 | dispatch_url("file:///home/bar/Music/The_Bars_Live.mp3"); |
345 | 138 | ASSERT_STREQ("com.ubuntu.music_music_1.5.4", upstart_app_launch_mock_get_last_app_id()); | 138 | ASSERT_STREQ("com.ubuntu.music_music_1.5.4", ubuntu_app_launch_mock_get_last_app_id()); |
346 | 139 | upstart_app_launch_mock_clear_last_app_id(); | 139 | ubuntu_app_launch_mock_clear_last_app_id(); |
347 | 140 | 140 | ||
348 | 141 | return; | 141 | return; |
349 | 142 | } | 142 | } |
350 | 143 | 143 | ||
351 | === modified file 'tests/service-test.cc' | |||
352 | --- tests/service-test.cc 2014-02-13 17:01:05 +0000 | |||
353 | +++ tests/service-test.cc 2014-05-26 13:09:13 +0000 | |||
354 | @@ -32,7 +32,7 @@ | |||
355 | 32 | GDBusConnection * bus = NULL; | 32 | GDBusConnection * bus = NULL; |
356 | 33 | 33 | ||
357 | 34 | virtual void SetUp() { | 34 | virtual void SetUp() { |
359 | 35 | g_setenv("UPSTART_APP_LAUNCH_USE_SESSION", "1", TRUE); | 35 | g_setenv("UBUNTU_APP_LAUNCH_USE_SESSION", "1", TRUE); |
360 | 36 | g_setenv("URL_DISPATCHER_DISABLE_RECOVERABLE_ERROR", "1", TRUE); | 36 | g_setenv("URL_DISPATCHER_DISABLE_RECOVERABLE_ERROR", "1", TRUE); |
361 | 37 | 37 | ||
362 | 38 | service = dbus_test_service_new(NULL); | 38 | service = dbus_test_service_new(NULL); |
363 | 39 | 39 | ||
364 | === renamed file 'tests/upstart-app-launch-mock.c' => 'tests/ubuntu-app-launch-mock.c' | |||
365 | --- tests/upstart-app-launch-mock.c 2013-09-26 16:04:51 +0000 | |||
366 | +++ tests/ubuntu-app-launch-mock.c 2014-05-26 13:09:13 +0000 | |||
367 | @@ -15,21 +15,21 @@ | |||
368 | 15 | * | 15 | * |
369 | 16 | */ | 16 | */ |
370 | 17 | 17 | ||
373 | 18 | #include <upstart-app-launch.h> | 18 | #include <ubuntu-app-launch.h> |
374 | 19 | #include "upstart-app-launch-mock.h" | 19 | #include "ubuntu-app-launch-mock.h" |
375 | 20 | 20 | ||
376 | 21 | static gchar * last_appid = NULL; | 21 | static gchar * last_appid = NULL; |
377 | 22 | 22 | ||
378 | 23 | gboolean | 23 | gboolean |
380 | 24 | upstart_app_launch_start_application (const gchar * appid, const gchar * const * uris) | 24 | ubuntu_app_launch_start_application (const gchar * appid, const gchar * const * uris) |
381 | 25 | { | 25 | { |
383 | 26 | upstart_app_launch_mock_clear_last_app_id(); | 26 | ubuntu_app_launch_mock_clear_last_app_id(); |
384 | 27 | last_appid = g_strdup(appid); | 27 | last_appid = g_strdup(appid); |
385 | 28 | return TRUE; | 28 | return TRUE; |
386 | 29 | } | 29 | } |
387 | 30 | 30 | ||
388 | 31 | void | 31 | void |
390 | 32 | upstart_app_launch_mock_clear_last_app_id (void) | 32 | ubuntu_app_launch_mock_clear_last_app_id (void) |
391 | 33 | { | 33 | { |
392 | 34 | g_free(last_appid); | 34 | g_free(last_appid); |
393 | 35 | last_appid = NULL; | 35 | last_appid = NULL; |
394 | @@ -37,7 +37,7 @@ | |||
395 | 37 | } | 37 | } |
396 | 38 | 38 | ||
397 | 39 | gchar * | 39 | gchar * |
399 | 40 | upstart_app_launch_mock_get_last_app_id (void) | 40 | ubuntu_app_launch_mock_get_last_app_id (void) |
400 | 41 | { | 41 | { |
401 | 42 | return last_appid; | 42 | return last_appid; |
402 | 43 | } | 43 | } |
403 | 44 | 44 | ||
404 | === renamed file 'tests/upstart-app-launch-mock.h' => 'tests/ubuntu-app-launch-mock.h' | |||
405 | --- tests/upstart-app-launch-mock.h 2013-09-26 16:01:14 +0000 | |||
406 | +++ tests/ubuntu-app-launch-mock.h 2014-05-26 13:09:13 +0000 | |||
407 | @@ -22,8 +22,8 @@ | |||
408 | 22 | 22 | ||
409 | 23 | G_BEGIN_DECLS | 23 | G_BEGIN_DECLS |
410 | 24 | 24 | ||
413 | 25 | void upstart_app_launch_mock_clear_last_app_id (void); | 25 | void ubuntu_app_launch_mock_clear_last_app_id (void); |
414 | 26 | gchar * upstart_app_launch_mock_get_last_app_id (void); | 26 | gchar * ubuntu_app_launch_mock_get_last_app_id (void); |
415 | 27 | 27 | ||
416 | 28 | G_END_DECLS | 28 | G_END_DECLS |
417 | 29 | 29 |
FAILED: Continuous integration, rev:52 jenkins. qa.ubuntu. com/job/ url-dispatcher- ci/109/ jenkins. qa.ubuntu. com/job/ url-dispatcher- utopic- amd64-ci/ 1/console jenkins. qa.ubuntu. com/job/ url-dispatcher- utopic- armhf-ci/ 1/console jenkins. qa.ubuntu. com/job/ url-dispatcher- utopic- i386-ci/ 1/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/url- dispatcher- ci/109/ rebuild
http://