Merge lp:~robert-ancell/unity/gnome-software into lp:unity
- gnome-software
- Merge into trunk
Proposed by
Robert Ancell
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | no longer in the source branch. |
Merged at revision: | 4078 |
Proposed branch: | lp:~robert-ancell/unity/gnome-software |
Merge into: | lp:unity |
Diff against target: |
308 lines (+50/-51) 8 files modified
com.canonical.Unity.gschema.xml (+1/-1) tests/data/applications/org.gnome.Software.desktop (+3/-4) tests/test_application_launcher_icon.cpp (+7/-7) tests/test_desktop_utilities.cpp (+3/-3) tests/test_favorite_store.cpp (+1/-1) tests/test_favorite_store_gsettings.cpp (+1/-1) tests/test_launcher_controller.cpp (+1/-1) tests/test_software_center_launcher_icon.cpp (+33/-33) |
To merge this branch: | bzr merge lp:~robert-ancell/unity/gnome-software |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Trevisan (Treviño) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Review via email: mp+286715@code.launchpad.net |
Commit message
Switch from Ubuntu Software Center to GNOME Software.
Description of the change
To post a comment you must log in.
Revision history for this message
Robert Ancell (robert-ancell) wrote : | # |
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:4076
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
Robert Ancell (robert-ancell) wrote : | # |
Revision history for this message
Robert Ancell (robert-ancell) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'com.canonical.Unity.gschema.xml' | |||
2 | --- com.canonical.Unity.gschema.xml 2015-11-23 09:24:10 +0000 | |||
3 | +++ com.canonical.Unity.gschema.xml 2016-02-19 22:04:59 +0000 | |||
4 | @@ -117,7 +117,7 @@ | |||
5 | 117 | 'application://libreoffice-writer.desktop', | 117 | 'application://libreoffice-writer.desktop', |
6 | 118 | 'application://libreoffice-calc.desktop', | 118 | 'application://libreoffice-calc.desktop', |
7 | 119 | 'application://libreoffice-impress.desktop', | 119 | 'application://libreoffice-impress.desktop', |
9 | 120 | 'application://ubuntu-software-center.desktop', | 120 | 'application://org.gnome.Software.desktop', |
10 | 121 | 'application://ubuntu-amazon-default.desktop', | 121 | 'application://ubuntu-amazon-default.desktop', |
11 | 122 | 'application://unity-control-center.desktop', | 122 | 'application://unity-control-center.desktop', |
12 | 123 | 'unity://running-apps', | 123 | 'unity://running-apps', |
13 | 124 | 124 | ||
14 | === renamed file 'tests/data/applications/ubuntu-software-center.desktop' => 'tests/data/applications/org.gnome.Software.desktop' | |||
15 | --- tests/data/applications/ubuntu-software-center.desktop 2013-06-28 12:52:58 +0000 | |||
16 | +++ tests/data/applications/org.gnome.Software.desktop 2016-02-19 22:04:59 +0000 | |||
17 | @@ -1,9 +1,8 @@ | |||
18 | 1 | [Desktop Entry] | 1 | [Desktop Entry] |
22 | 2 | Name=Ubuntu Software Center | 2 | Name=Software |
23 | 3 | GenericName=Software Center | 3 | Comment=Add, remove or update software on this computer |
21 | 4 | Comment=Lets you choose from thousands of applications available for Ubuntu | ||
24 | 5 | Exec=/bin/true | 4 | Exec=/bin/true |
26 | 6 | Icon=softwarecenter | 5 | Icon=org.gnome.Software |
27 | 7 | Terminal=false | 6 | Terminal=false |
28 | 8 | Type=Application | 7 | Type=Application |
29 | 9 | Categories=PackageManager;GTK;System;Settings; | 8 | Categories=PackageManager;GTK;System;Settings; |
30 | 10 | 9 | ||
31 | === modified file 'tests/test_application_launcher_icon.cpp' | |||
32 | --- tests/test_application_launcher_icon.cpp 2015-12-08 14:34:55 +0000 | |||
33 | +++ tests/test_application_launcher_icon.cpp 2016-02-19 22:04:59 +0000 | |||
34 | @@ -41,7 +41,7 @@ | |||
35 | 41 | namespace | 41 | namespace |
36 | 42 | { | 42 | { |
37 | 43 | const std::string DEFAULT_EMPTY_ICON = "application-default-icon"; | 43 | const std::string DEFAULT_EMPTY_ICON = "application-default-icon"; |
39 | 44 | const std::string USC_DESKTOP = BUILDDIR"/tests/data/applications/ubuntu-software-center.desktop"; | 44 | const std::string GS_DESKTOP = BUILDDIR"/tests/data/applications/org.gnome.Software.desktop"; |
40 | 45 | const std::string UM_DESKTOP = BUILDDIR"/tests/data/applications/update-manager.desktop"; | 45 | const std::string UM_DESKTOP = BUILDDIR"/tests/data/applications/update-manager.desktop"; |
41 | 46 | const std::string NO_ICON_DESKTOP = BUILDDIR"/tests/data/applications/no-icon.desktop"; | 46 | const std::string NO_ICON_DESKTOP = BUILDDIR"/tests/data/applications/no-icon.desktop"; |
42 | 47 | 47 | ||
43 | @@ -93,9 +93,9 @@ | |||
44 | 93 | 93 | ||
45 | 94 | virtual void SetUp() override | 94 | virtual void SetUp() override |
46 | 95 | { | 95 | { |
48 | 96 | usc_app = std::make_shared<MockApplication::Nice>(USC_DESKTOP, "softwarecenter"); | 96 | usc_app = std::make_shared<MockApplication::Nice>(GS_DESKTOP, "org.gnome.Software"); |
49 | 97 | usc_icon = new MockApplicationLauncherIcon(usc_app); | 97 | usc_icon = new MockApplicationLauncherIcon(usc_app); |
51 | 98 | ASSERT_EQ(usc_icon->DesktopFile(), USC_DESKTOP); | 98 | ASSERT_EQ(usc_icon->DesktopFile(), GS_DESKTOP); |
52 | 99 | 99 | ||
53 | 100 | empty_app = std::make_shared<MockApplication::Nice>(NO_ICON_DESKTOP); | 100 | empty_app = std::make_shared<MockApplication::Nice>(NO_ICON_DESKTOP); |
54 | 101 | empty_icon = new MockApplicationLauncherIcon(empty_app); | 101 | empty_icon = new MockApplicationLauncherIcon(empty_app); |
55 | @@ -175,7 +175,7 @@ | |||
56 | 175 | 175 | ||
57 | 176 | TEST_F(TestApplicationLauncherIcon, ApplicationSignalDisconnection) | 176 | TEST_F(TestApplicationLauncherIcon, ApplicationSignalDisconnection) |
58 | 177 | { | 177 | { |
60 | 178 | std::shared_ptr<MockApplication> app = std::make_shared<MockApplication::Nice>(USC_DESKTOP); | 178 | std::shared_ptr<MockApplication> app = std::make_shared<MockApplication::Nice>(GS_DESKTOP); |
61 | 179 | { | 179 | { |
62 | 180 | MockApplicationLauncherIcon::Ptr icon(new MockApplicationLauncherIcon(app)); | 180 | MockApplicationLauncherIcon::Ptr icon(new MockApplicationLauncherIcon(app)); |
63 | 181 | EXPECT_FALSE(app->closed.empty()); | 181 | EXPECT_FALSE(app->closed.empty()); |
64 | @@ -201,7 +201,7 @@ | |||
65 | 201 | 201 | ||
66 | 202 | TEST_F(TestApplicationLauncherIcon, TestDefaultIcon) | 202 | TEST_F(TestApplicationLauncherIcon, TestDefaultIcon) |
67 | 203 | { | 203 | { |
69 | 204 | EXPECT_EQ(usc_icon->icon_name(), "softwarecenter"); | 204 | EXPECT_EQ(usc_icon->icon_name(), "org.gnome.Software"); |
70 | 205 | EXPECT_EQ(empty_icon->icon_name(), DEFAULT_EMPTY_ICON); | 205 | EXPECT_EQ(empty_icon->icon_name(), DEFAULT_EMPTY_ICON); |
71 | 206 | EXPECT_EQ(mock_icon->icon_name(), DEFAULT_EMPTY_ICON); | 206 | EXPECT_EQ(mock_icon->icon_name(), DEFAULT_EMPTY_ICON); |
72 | 207 | } | 207 | } |
73 | @@ -267,7 +267,7 @@ | |||
74 | 267 | 267 | ||
75 | 268 | TEST_F(TestApplicationLauncherIcon, StickStickedDesktopApp) | 268 | TEST_F(TestApplicationLauncherIcon, StickStickedDesktopApp) |
76 | 269 | { | 269 | { |
78 | 270 | auto app = std::make_shared<MockApplication::Nice>(USC_DESKTOP); | 270 | auto app = std::make_shared<MockApplication::Nice>(GS_DESKTOP); |
79 | 271 | app->sticky = true; | 271 | app->sticky = true; |
80 | 272 | app->desktop_file_ = UM_DESKTOP; | 272 | app->desktop_file_ = UM_DESKTOP; |
81 | 273 | MockApplicationLauncherIcon::Ptr icon(new MockApplicationLauncherIcon(app)); | 273 | MockApplicationLauncherIcon::Ptr icon(new MockApplicationLauncherIcon(app)); |
82 | @@ -542,7 +542,7 @@ | |||
83 | 542 | 542 | ||
84 | 543 | TEST_F(TestApplicationLauncherIcon, RemoteUri) | 543 | TEST_F(TestApplicationLauncherIcon, RemoteUri) |
85 | 544 | { | 544 | { |
87 | 545 | EXPECT_EQ(usc_icon->RemoteUri(), FavoriteStore::URI_PREFIX_APP + USC_DESKTOP); | 545 | EXPECT_EQ(usc_icon->RemoteUri(), FavoriteStore::URI_PREFIX_APP + GS_DESKTOP); |
88 | 546 | EXPECT_TRUE(mock_icon->RemoteUri().empty()); | 546 | EXPECT_TRUE(mock_icon->RemoteUri().empty()); |
89 | 547 | } | 547 | } |
90 | 548 | 548 | ||
91 | 549 | 549 | ||
92 | === modified file 'tests/test_desktop_utilities.cpp' | |||
93 | --- tests/test_desktop_utilities.cpp 2013-03-21 14:01:06 +0000 | |||
94 | +++ tests/test_desktop_utilities.cpp 2016-02-19 22:04:59 +0000 | |||
95 | @@ -184,17 +184,17 @@ | |||
96 | 184 | g_setenv("XDG_DATA_DIRS", LOCAL_DATA_DIR.c_str(), TRUE); | 184 | g_setenv("XDG_DATA_DIRS", LOCAL_DATA_DIR.c_str(), TRUE); |
97 | 185 | g_setenv("XDG_DATA_HOME", "UnityUserConfig", TRUE); | 185 | g_setenv("XDG_DATA_HOME", "UnityUserConfig", TRUE); |
98 | 186 | 186 | ||
100 | 187 | std::string const& file = DesktopUtilities::GetDesktopPathById("ubuntu-software-center.desktop"); | 187 | std::string const& file = DesktopUtilities::GetDesktopPathById("org.gnome.Software.desktop"); |
101 | 188 | 188 | ||
102 | 189 | g_setenv("XDG_DATA_DIRS", old_dirs.c_str(), TRUE); | 189 | g_setenv("XDG_DATA_DIRS", old_dirs.c_str(), TRUE); |
103 | 190 | g_setenv("XDG_DATA_HOME", old_dirs.c_str(), TRUE); | 190 | g_setenv("XDG_DATA_HOME", old_dirs.c_str(), TRUE); |
104 | 191 | 191 | ||
106 | 192 | EXPECT_EQ(file, LOCAL_DATA_DIR + "/applications/ubuntu-software-center.desktop"); | 192 | EXPECT_EQ(file, LOCAL_DATA_DIR + "/applications/org.gnome.Software.desktop"); |
107 | 193 | } | 193 | } |
108 | 194 | 194 | ||
109 | 195 | TEST(TestDesktopUtilities, TestGetBackgroundColor) | 195 | TEST(TestDesktopUtilities, TestGetBackgroundColor) |
110 | 196 | { | 196 | { |
112 | 197 | std::string const& color = DesktopUtilities::GetBackgroundColor(LOCAL_DATA_DIR+"/applications/ubuntu-software-center.desktop"); | 197 | std::string const& color = DesktopUtilities::GetBackgroundColor(LOCAL_DATA_DIR+"/applications/org.gnome.Software.desktop"); |
113 | 198 | 198 | ||
114 | 199 | EXPECT_EQ(color, "#aabbcc"); | 199 | EXPECT_EQ(color, "#aabbcc"); |
115 | 200 | } | 200 | } |
116 | 201 | 201 | ||
117 | === modified file 'tests/test_favorite_store.cpp' | |||
118 | --- tests/test_favorite_store.cpp 2012-09-18 15:47:49 +0000 | |||
119 | +++ tests/test_favorite_store.cpp 2016-02-19 22:04:59 +0000 | |||
120 | @@ -87,7 +87,7 @@ | |||
121 | 87 | 87 | ||
122 | 88 | TEST_F(TestFavoriteStore, ParseFavoriteFromUri) | 88 | TEST_F(TestFavoriteStore, ParseFavoriteFromUri) |
123 | 89 | { | 89 | { |
125 | 90 | const std::string VALID_DESKTOP_PATH = BUILDDIR"/tests/data/applications/ubuntu-software-center.desktop"; | 90 | const std::string VALID_DESKTOP_PATH = BUILDDIR"/tests/data/applications/org.gnome.Software.desktop"; |
126 | 91 | EXPECT_EQ(favorite_store.ParseFavoriteFromUri("file.desktop"), "application://file.desktop"); | 91 | EXPECT_EQ(favorite_store.ParseFavoriteFromUri("file.desktop"), "application://file.desktop"); |
127 | 92 | EXPECT_EQ(favorite_store.ParseFavoriteFromUri(VALID_DESKTOP_PATH), "application://"+VALID_DESKTOP_PATH); | 92 | EXPECT_EQ(favorite_store.ParseFavoriteFromUri(VALID_DESKTOP_PATH), "application://"+VALID_DESKTOP_PATH); |
128 | 93 | 93 | ||
129 | 94 | 94 | ||
130 | === modified file 'tests/test_favorite_store_gsettings.cpp' | |||
131 | --- tests/test_favorite_store_gsettings.cpp 2014-03-21 03:42:28 +0000 | |||
132 | +++ tests/test_favorite_store_gsettings.cpp 2016-02-19 22:04:59 +0000 | |||
133 | @@ -38,7 +38,7 @@ | |||
134 | 38 | const gchar* SETTINGS_KEY = "favorites"; | 38 | const gchar* SETTINGS_KEY = "favorites"; |
135 | 39 | 39 | ||
136 | 40 | const char* base_store_favs[] = { BUILDDIR"/tests/data/applications/ubuntuone-installer.desktop", | 40 | const char* base_store_favs[] = { BUILDDIR"/tests/data/applications/ubuntuone-installer.desktop", |
138 | 41 | "file://" BUILDDIR "/tests/data/applications/ubuntu-software-center.desktop", | 41 | "file://" BUILDDIR "/tests/data/applications/org.gnome.Software.desktop", |
139 | 42 | "application://" BUILDDIR "/tests/data/applications/update-manager.desktop", | 42 | "application://" BUILDDIR "/tests/data/applications/update-manager.desktop", |
140 | 43 | "unity://test-icon", | 43 | "unity://test-icon", |
141 | 44 | "device://uuid", | 44 | "device://uuid", |
142 | 45 | 45 | ||
143 | === modified file 'tests/test_launcher_controller.cpp' | |||
144 | --- tests/test_launcher_controller.cpp 2015-12-08 14:34:55 +0000 | |||
145 | +++ tests/test_launcher_controller.cpp 2016-02-19 22:04:59 +0000 | |||
146 | @@ -61,7 +61,7 @@ | |||
147 | 61 | namespace app | 61 | namespace app |
148 | 62 | { | 62 | { |
149 | 63 | const std::string UBUNTU_ONE = BUILDDIR "/tests/data/applications/ubuntuone-installer.desktop"; | 63 | const std::string UBUNTU_ONE = BUILDDIR "/tests/data/applications/ubuntuone-installer.desktop"; |
151 | 64 | const std::string SW_CENTER = BUILDDIR "/tests/data/applications/ubuntu-software-center.desktop"; | 64 | const std::string SW_CENTER = BUILDDIR "/tests/data/applications/org.gnome.Software.desktop"; |
152 | 65 | const std::string UPDATE_MANAGER = BUILDDIR "/tests/data/applications/update-manager.desktop"; | 65 | const std::string UPDATE_MANAGER = BUILDDIR "/tests/data/applications/update-manager.desktop"; |
153 | 66 | const std::string BZR_HANDLE_PATCH = BUILDDIR "/tests/data/applications/bzr-handle-patch.desktop"; | 66 | const std::string BZR_HANDLE_PATCH = BUILDDIR "/tests/data/applications/bzr-handle-patch.desktop"; |
154 | 67 | const std::string NO_ICON = BUILDDIR "/tests/data/applications/no-icon.desktop"; | 67 | const std::string NO_ICON = BUILDDIR "/tests/data/applications/no-icon.desktop"; |
155 | 68 | 68 | ||
156 | === modified file 'tests/test_software_center_launcher_icon.cpp' | |||
157 | --- tests/test_software_center_launcher_icon.cpp 2015-12-08 14:34:55 +0000 | |||
158 | +++ tests/test_software_center_launcher_icon.cpp 2016-02-19 22:04:59 +0000 | |||
159 | @@ -42,19 +42,19 @@ | |||
160 | 42 | { | 42 | { |
161 | 43 | namespace | 43 | namespace |
162 | 44 | { | 44 | { |
166 | 45 | const std::string PRE_INSTALL_ICON = "sw-center-launcher-icon"; | 45 | const std::string PRE_INSTALL_ICON = "software-launcher-icon"; |
167 | 46 | const std::string FINAL_ICON = "softwarecenter"; | 46 | const std::string FINAL_ICON = "org.gnome.Software"; |
168 | 47 | const std::string APP_NAME = "Ubuntu Software Center"; | 47 | const std::string APP_NAME = "Software"; |
169 | 48 | const std::string LOCAL_DATA_DIR = BUILDDIR"/tests/data"; | 48 | const std::string LOCAL_DATA_DIR = BUILDDIR"/tests/data"; |
172 | 49 | const std::string USC_DESKTOP = LOCAL_DATA_DIR+"/applications/ubuntu-software-center.desktop"; | 49 | const std::string GS_DESKTOP = LOCAL_DATA_DIR+"/applications/org.gnome.Software.desktop"; |
173 | 50 | const std::string USC_APP_INSTALL_DESKTOP = "/usr/share/app-install/desktop/software-center:ubuntu-software-center.desktop"; | 50 | const std::string GS_APP_INSTALL_DESKTOP = "/usr/share/app-install/desktop/software-center:org.gnome.Software.desktop"; |
174 | 51 | } | 51 | } |
175 | 52 | 52 | ||
176 | 53 | struct TestSoftwareCenterLauncherIcon : testmocks::TestUnityAppBase | 53 | struct TestSoftwareCenterLauncherIcon : testmocks::TestUnityAppBase |
177 | 54 | { | 54 | { |
178 | 55 | TestSoftwareCenterLauncherIcon() | 55 | TestSoftwareCenterLauncherIcon() |
181 | 56 | : usc(std::make_shared<MockApplication::Nice>(USC_APP_INSTALL_DESKTOP, FINAL_ICON, APP_NAME)) | 56 | : gs(std::make_shared<MockApplication::Nice>(GS_APP_INSTALL_DESKTOP, FINAL_ICON, APP_NAME)) |
182 | 57 | , icon(usc, "/com/canonical/unity/test/object/path", PRE_INSTALL_ICON) | 57 | , icon(gs, "/com/canonical/unity/test/object/path", PRE_INSTALL_ICON) |
183 | 58 | {} | 58 | {} |
184 | 59 | 59 | ||
185 | 60 | struct MockSoftwareCenterLauncherIcon : SoftwareCenterLauncherIcon | 60 | struct MockSoftwareCenterLauncherIcon : SoftwareCenterLauncherIcon |
186 | @@ -86,7 +86,7 @@ | |||
187 | 86 | 86 | ||
188 | 87 | panel::Style panel; | 87 | panel::Style panel; |
189 | 88 | nux::ObjectPtr<MockableBaseWindow> launcher_win; | 88 | nux::ObjectPtr<MockableBaseWindow> launcher_win; |
191 | 89 | MockApplication::Ptr usc; | 89 | MockApplication::Ptr gs; |
192 | 90 | MockSoftwareCenterLauncherIcon icon; | 90 | MockSoftwareCenterLauncherIcon icon; |
193 | 91 | }; | 91 | }; |
194 | 92 | 92 | ||
195 | @@ -102,23 +102,23 @@ | |||
196 | 102 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformTrivial) | 102 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformTrivial) |
197 | 103 | { | 103 | { |
198 | 104 | // no transformation needed | 104 | // no transformation needed |
201 | 105 | usc->desktop_file_ = USC_DESKTOP; | 105 | gs->desktop_file_ = GS_DESKTOP; |
202 | 106 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), USC_DESKTOP); | 106 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), GS_DESKTOP); |
203 | 107 | } | 107 | } |
204 | 108 | 108 | ||
205 | 109 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformAppInstall) | 109 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformAppInstall) |
206 | 110 | { | 110 | { |
207 | 111 | // ensure that tranformation from app-install data desktop files works | 111 | // ensure that tranformation from app-install data desktop files works |
209 | 112 | usc->desktop_file_ = "/usr/share/app-install/desktop/pkgname:kde4__afile.desktop"; | 112 | gs->desktop_file_ = "/usr/share/app-install/desktop/pkgname:kde4__afile.desktop"; |
210 | 113 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), | 113 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), |
211 | 114 | LOCAL_DATA_DIR+"/applications/kde4/afile.desktop"); | 114 | LOCAL_DATA_DIR+"/applications/kde4/afile.desktop"); |
212 | 115 | } | 115 | } |
213 | 116 | 116 | ||
214 | 117 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformSCAgent) | 117 | TEST_F(TestSoftwareCenterLauncherIcon, DesktopFileTransformSCAgent) |
215 | 118 | { | 118 | { |
219 | 119 | // now simualte data coming from the sc-agent | 119 | // now simualte data coming from the software-center-agent |
220 | 120 | usc->desktop_file_ = "/tmp/software-center-agent:VP2W9M:ubuntu-software-center.desktop"; | 120 | gs->desktop_file_ = "/tmp/software-center-agent:VP2W9M:org.gnome.Software.desktop"; |
221 | 121 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), USC_DESKTOP); | 121 | EXPECT_EQ(icon.GetActualDesktopFileAfterInstall(), GS_DESKTOP); |
222 | 122 | } | 122 | } |
223 | 123 | 123 | ||
224 | 124 | // simulate a OnFinished signal from a /usr/share/app-install location | 124 | // simulate a OnFinished signal from a /usr/share/app-install location |
225 | @@ -128,41 +128,41 @@ | |||
226 | 128 | { | 128 | { |
227 | 129 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); | 129 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); |
228 | 130 | 130 | ||
230 | 131 | EXPECT_EQ(USC_DESKTOP, icon.DesktopFile()); | 131 | EXPECT_EQ(GS_DESKTOP, icon.DesktopFile()); |
231 | 132 | } | 132 | } |
232 | 133 | 133 | ||
233 | 134 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedUpdatesRemoteURI) | 134 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedUpdatesRemoteURI) |
234 | 135 | { | 135 | { |
235 | 136 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); | 136 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); |
236 | 137 | 137 | ||
239 | 138 | ASSERT_EQ(USC_DESKTOP, icon.DesktopFile()); | 138 | ASSERT_EQ(GS_DESKTOP, icon.DesktopFile()); |
240 | 139 | EXPECT_EQ(FavoriteStore::URI_PREFIX_APP + USC_DESKTOP, icon.GetRemoteUri()); | 139 | EXPECT_EQ(FavoriteStore::URI_PREFIX_APP + GS_DESKTOP, icon.GetRemoteUri()); |
241 | 140 | } | 140 | } |
242 | 141 | 141 | ||
243 | 142 | TEST_F(TestSoftwareCenterLauncherIcon, DisconnectsOldAppSignals) | 142 | TEST_F(TestSoftwareCenterLauncherIcon, DisconnectsOldAppSignals) |
244 | 143 | { | 143 | { |
246 | 144 | ASSERT_FALSE(usc->closed.empty()); | 144 | ASSERT_FALSE(gs->closed.empty()); |
247 | 145 | 145 | ||
248 | 146 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); | 146 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); |
249 | 147 | 147 | ||
261 | 148 | EXPECT_TRUE(usc->closed.empty()); | 148 | EXPECT_TRUE(gs->closed.empty()); |
262 | 149 | EXPECT_TRUE(usc->window_opened.empty()); | 149 | EXPECT_TRUE(gs->window_opened.empty()); |
263 | 150 | EXPECT_TRUE(usc->window_moved.empty()); | 150 | EXPECT_TRUE(gs->window_moved.empty()); |
264 | 151 | EXPECT_TRUE(usc->window_closed.empty()); | 151 | EXPECT_TRUE(gs->window_closed.empty()); |
265 | 152 | EXPECT_TRUE(usc->visible.changed.empty()); | 152 | EXPECT_TRUE(gs->visible.changed.empty()); |
266 | 153 | EXPECT_TRUE(usc->active.changed.empty()); | 153 | EXPECT_TRUE(gs->active.changed.empty()); |
267 | 154 | EXPECT_TRUE(usc->running.changed.empty()); | 154 | EXPECT_TRUE(gs->running.changed.empty()); |
268 | 155 | EXPECT_TRUE(usc->urgent.changed.empty()); | 155 | EXPECT_TRUE(gs->urgent.changed.empty()); |
269 | 156 | EXPECT_TRUE(usc->desktop_file.changed.empty()); | 156 | EXPECT_TRUE(gs->desktop_file.changed.empty()); |
270 | 157 | EXPECT_TRUE(usc->title.changed.empty()); | 157 | EXPECT_TRUE(gs->title.changed.empty()); |
271 | 158 | EXPECT_TRUE(usc->icon.changed.empty()); | 158 | EXPECT_TRUE(gs->icon.changed.empty()); |
272 | 159 | } | 159 | } |
273 | 160 | 160 | ||
274 | 161 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedRemoveInvalidNewAppIcon) | 161 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedRemoveInvalidNewAppIcon) |
275 | 162 | { | 162 | { |
276 | 163 | // Using an icon ptr, to get the removed signal to be properly emitted | 163 | // Using an icon ptr, to get the removed signal to be properly emitted |
277 | 164 | nux::ObjectPtr<MockSoftwareCenterLauncherIcon> icon_ptr( | 164 | nux::ObjectPtr<MockSoftwareCenterLauncherIcon> icon_ptr( |
279 | 165 | new MockSoftwareCenterLauncherIcon(usc, "/com/canonical/unity/test/object/path", PRE_INSTALL_ICON)); | 165 | new MockSoftwareCenterLauncherIcon(gs, "/com/canonical/unity/test/object/path", PRE_INSTALL_ICON)); |
280 | 166 | 166 | ||
281 | 167 | bool removed = false; | 167 | bool removed = false; |
282 | 168 | auto& app_manager = unity::ApplicationManager::Default(); | 168 | auto& app_manager = unity::ApplicationManager::Default(); |
283 | @@ -201,7 +201,7 @@ | |||
284 | 201 | icon.LauncherIconUnstick(); | 201 | icon.LauncherIconUnstick(); |
285 | 202 | 202 | ||
286 | 203 | bool saved = false; | 203 | bool saved = false; |
288 | 204 | usc->sticky = true; | 204 | gs->sticky = true; |
289 | 205 | icon.position_saved.connect([&saved] {saved = true;}); | 205 | icon.position_saved.connect([&saved] {saved = true;}); |
290 | 206 | ASSERT_FALSE(icon.IsSticky()); | 206 | ASSERT_FALSE(icon.IsSticky()); |
291 | 207 | 207 | ||
292 | @@ -214,14 +214,14 @@ | |||
293 | 214 | { | 214 | { |
294 | 215 | icon.tooltip_text = "FooText"; | 215 | icon.tooltip_text = "FooText"; |
295 | 216 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); | 216 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); |
297 | 217 | EXPECT_EQ(icon.tooltip_text(), usc->title()); | 217 | EXPECT_EQ(icon.tooltip_text(), gs->title()); |
298 | 218 | } | 218 | } |
299 | 219 | 219 | ||
300 | 220 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedUpdatesIcon) | 220 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedUpdatesIcon) |
301 | 221 | { | 221 | { |
302 | 222 | icon.icon_name = "foo-icon"; | 222 | icon.icon_name = "foo-icon"; |
303 | 223 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); | 223 | icon.OnFinished(glib::Variant(g_variant_new("(s)", "exit-success"))); |
305 | 224 | EXPECT_EQ(icon.icon_name(), usc->icon()); | 224 | EXPECT_EQ(icon.icon_name(), gs->icon()); |
306 | 225 | } | 225 | } |
307 | 226 | 226 | ||
308 | 227 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedLogsEvent) | 227 | TEST_F(TestSoftwareCenterLauncherIcon, OnFinishedLogsEvent) |
There was some remaining code relating to a software- center- agent which I'm not sure about. Is that still applicable?