1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/basictypes.h"
6 #include "base/strings/utf_string_conversions.h"
7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/extensions/bookmark_app_helper.h"
9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/launch_util.h"
11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/sync/test/integration/apps_helper.h"
13 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
14 #include "chrome/browser/sync/test/integration/sync_app_helper.h"
15 #include "chrome/browser/sync/test/integration/sync_integration_test_util.h"
16 #include "chrome/browser/sync/test/integration/sync_test.h"
17 #include "chrome/common/extensions/extension_constants.h"
18 #include "content/public/browser/notification_service.h"
19 #include "content/public/test/test_utils.h"
20 #include "extensions/browser/app_sorting.h"
21 #include "extensions/browser/extension_prefs.h"
22 #include "extensions/browser/extension_registry.h"
23 #include "sync/api/string_ordinal.h"
25 using apps_helper::AllProfilesHaveSameAppsAsVerifier;
26 using apps_helper::CopyNTPOrdinals;
27 using apps_helper::DisableApp;
28 using apps_helper::EnableApp;
29 using apps_helper::FixNTPOrdinalCollisions;
30 using apps_helper::GetAppLaunchOrdinalForApp;
31 using apps_helper::HasSameAppsAsVerifier;
32 using apps_helper::IncognitoDisableApp;
33 using apps_helper::IncognitoEnableApp;
34 using apps_helper::InstallApp;
35 using apps_helper::InstallAppsPendingForSync;
36 using apps_helper::InstallPlatformApp;
37 using apps_helper::SetAppLaunchOrdinalForApp;
38 using apps_helper::SetPageOrdinalForApp;
39 using apps_helper::UninstallApp;
40 using sync_integration_test_util::AwaitCommitActivityCompletion;
42 class TwoClientAppsSyncTest : public SyncTest {
44 TwoClientAppsSyncTest() : SyncTest(TWO_CLIENT) {}
46 virtual ~TwoClientAppsSyncTest() {}
49 DISALLOW_COPY_AND_ASSIGN(TwoClientAppsSyncTest);
52 class LegacyTwoClientAppsSyncTest : public SyncTest {
54 LegacyTwoClientAppsSyncTest() : SyncTest(TWO_CLIENT_LEGACY) {}
56 virtual ~LegacyTwoClientAppsSyncTest() {}
59 DISALLOW_COPY_AND_ASSIGN(LegacyTwoClientAppsSyncTest);
62 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, StartWithNoApps) {
63 ASSERT_TRUE(SetupSync());
65 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
68 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, StartWithSameApps) {
69 ASSERT_TRUE(SetupClients());
71 const int kNumApps = 5;
72 for (int i = 0; i < kNumApps; ++i) {
73 InstallApp(GetProfile(0), i);
74 InstallApp(GetProfile(1), i);
75 InstallApp(verifier(), i);
78 ASSERT_TRUE(SetupSync());
80 ASSERT_TRUE(AwaitQuiescence());
82 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
85 // Install some apps on both clients, some on only one client, some on only the
86 // other, and sync. Both clients should end up with all apps, and the app and
87 // page ordinals should be identical.
88 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, StartWithDifferentApps) {
89 ASSERT_TRUE(SetupClients());
93 const int kNumCommonApps = 5;
94 for (int j = 0; j < kNumCommonApps; ++i, ++j) {
95 InstallApp(GetProfile(0), i);
96 InstallApp(GetProfile(1), i);
97 InstallApp(verifier(), i);
100 const int kNumProfile0Apps = 10;
101 for (int j = 0; j < kNumProfile0Apps; ++i, ++j) {
102 InstallApp(GetProfile(0), i);
103 InstallApp(verifier(), i);
104 CopyNTPOrdinals(GetProfile(0), verifier(), i);
107 const int kNumProfile1Apps = 10;
108 for (int j = 0; j < kNumProfile1Apps; ++i, ++j) {
109 InstallApp(GetProfile(1), i);
110 InstallApp(verifier(), i);
111 CopyNTPOrdinals(GetProfile(1), verifier(), i);
114 const int kNumPlatformApps = 5;
115 for (int j = 0; j < kNumPlatformApps; ++i, ++j) {
116 InstallPlatformApp(GetProfile(1), i);
117 InstallPlatformApp(verifier(), i);
118 CopyNTPOrdinals(GetProfile(1), verifier(), i);
121 FixNTPOrdinalCollisions(verifier());
123 ASSERT_TRUE(SetupSync());
125 ASSERT_TRUE(AwaitQuiescence());
127 InstallAppsPendingForSync(GetProfile(0));
128 InstallAppsPendingForSync(GetProfile(1));
130 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
133 // Install some apps on both clients, then sync. Then install some apps on only
134 // one client, some on only the other, and then sync again. Both clients should
135 // end up with all apps, and the app and page ordinals should be identical.
136 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, InstallDifferentApps) {
137 ASSERT_TRUE(SetupClients());
141 const int kNumCommonApps = 5;
142 for (int j = 0; j < kNumCommonApps; ++i, ++j) {
143 InstallApp(GetProfile(0), i);
144 InstallApp(GetProfile(1), i);
145 InstallApp(verifier(), i);
148 ASSERT_TRUE(SetupSync());
150 ASSERT_TRUE(AwaitQuiescence());
152 const int kNumProfile0Apps = 10;
153 for (int j = 0; j < kNumProfile0Apps; ++i, ++j) {
154 InstallApp(GetProfile(0), i);
155 InstallApp(verifier(), i);
156 CopyNTPOrdinals(GetProfile(0), verifier(), i);
159 const int kNumProfile1Apps = 10;
160 for (int j = 0; j < kNumProfile1Apps; ++i, ++j) {
161 InstallApp(GetProfile(1), i);
162 InstallApp(verifier(), i);
163 CopyNTPOrdinals(GetProfile(1), verifier(), i);
166 FixNTPOrdinalCollisions(verifier());
168 ASSERT_TRUE(AwaitQuiescence());
170 InstallAppsPendingForSync(GetProfile(0));
171 InstallAppsPendingForSync(GetProfile(1));
173 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
177 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, Add) {
178 ASSERT_TRUE(SetupSync());
179 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
181 InstallApp(GetProfile(0), 0);
182 InstallApp(verifier(), 0);
183 ASSERT_TRUE(AwaitQuiescence());
185 InstallAppsPendingForSync(GetProfile(0));
186 InstallAppsPendingForSync(GetProfile(1));
187 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
191 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, Uninstall) {
192 ASSERT_TRUE(SetupSync());
193 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
195 InstallApp(GetProfile(0), 0);
196 InstallApp(verifier(), 0);
197 ASSERT_TRUE(AwaitQuiescence());
199 InstallAppsPendingForSync(GetProfile(0));
200 InstallAppsPendingForSync(GetProfile(1));
201 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
203 UninstallApp(GetProfile(0), 0);
204 UninstallApp(verifier(), 0);
205 ASSERT_TRUE(AwaitQuiescence());
206 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
209 // Install an app on one client, then sync. Then uninstall the app on the first
210 // client and sync again. Now install a new app on the first client and sync.
211 // Both client should only have the second app, with identical app and page
213 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UninstallThenInstall) {
214 ASSERT_TRUE(SetupSync());
215 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
217 InstallApp(GetProfile(0), 0);
218 InstallApp(verifier(), 0);
219 ASSERT_TRUE(AwaitQuiescence());
221 InstallAppsPendingForSync(GetProfile(0));
222 InstallAppsPendingForSync(GetProfile(1));
223 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
225 UninstallApp(GetProfile(0), 0);
226 UninstallApp(verifier(), 0);
227 ASSERT_TRUE(AwaitQuiescence());
228 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
230 InstallApp(GetProfile(0), 1);
231 InstallApp(verifier(), 1);
232 ASSERT_TRUE(AwaitQuiescence());
233 InstallAppsPendingForSync(GetProfile(0));
234 InstallAppsPendingForSync(GetProfile(1));
235 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
239 // Flaky: http://crbug.com/226055
240 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, DISABLED_Merge) {
241 ASSERT_TRUE(SetupSync());
242 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
244 InstallApp(GetProfile(0), 0);
245 InstallApp(GetProfile(1), 0);
246 ASSERT_TRUE(AwaitQuiescence());
248 UninstallApp(GetProfile(0), 0);
249 InstallApp(GetProfile(0), 1);
250 InstallApp(verifier(), 1);
252 InstallApp(GetProfile(0), 2);
253 InstallApp(GetProfile(1), 2);
254 InstallApp(verifier(), 2);
256 InstallApp(GetProfile(1), 3);
257 InstallApp(verifier(), 3);
259 ASSERT_TRUE(AwaitQuiescence());
260 InstallAppsPendingForSync(GetProfile(0));
261 InstallAppsPendingForSync(GetProfile(1));
262 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
266 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateEnableDisableApp) {
267 ASSERT_TRUE(SetupSync());
268 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
270 InstallApp(GetProfile(0), 0);
271 InstallApp(GetProfile(1), 0);
272 InstallApp(verifier(), 0);
273 ASSERT_TRUE(AwaitQuiescence());
274 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
276 DisableApp(GetProfile(0), 0);
277 DisableApp(verifier(), 0);
278 ASSERT_TRUE(HasSameAppsAsVerifier(0));
279 ASSERT_FALSE(HasSameAppsAsVerifier(1));
281 ASSERT_TRUE(AwaitQuiescence());
282 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
284 EnableApp(GetProfile(1), 0);
285 EnableApp(verifier(), 0);
286 ASSERT_TRUE(HasSameAppsAsVerifier(1));
287 ASSERT_FALSE(HasSameAppsAsVerifier(0));
289 ASSERT_TRUE(AwaitQuiescence());
290 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
294 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateIncognitoEnableDisable) {
295 ASSERT_TRUE(SetupSync());
296 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
298 InstallApp(GetProfile(0), 0);
299 InstallApp(GetProfile(1), 0);
300 InstallApp(verifier(), 0);
301 ASSERT_TRUE(AwaitQuiescence());
302 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
304 IncognitoEnableApp(GetProfile(0), 0);
305 IncognitoEnableApp(verifier(), 0);
306 ASSERT_TRUE(HasSameAppsAsVerifier(0));
307 ASSERT_FALSE(HasSameAppsAsVerifier(1));
309 ASSERT_TRUE(AwaitQuiescence());
310 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
312 IncognitoDisableApp(GetProfile(1), 0);
313 IncognitoDisableApp(verifier(), 0);
314 ASSERT_TRUE(HasSameAppsAsVerifier(1));
315 ASSERT_FALSE(HasSameAppsAsVerifier(0));
317 ASSERT_TRUE(AwaitQuiescence());
318 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
322 IN_PROC_BROWSER_TEST_F(LegacyTwoClientAppsSyncTest, DisableApps) {
323 ASSERT_TRUE(SetupSync());
324 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
326 ASSERT_TRUE(GetClient(1)->DisableSyncForDatatype(syncer::APPS));
327 InstallApp(GetProfile(0), 0);
328 InstallApp(verifier(), 0);
329 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0))));
330 ASSERT_TRUE(HasSameAppsAsVerifier(0));
331 ASSERT_FALSE(HasSameAppsAsVerifier(1));
333 ASSERT_TRUE(GetClient(1)->EnableSyncForDatatype(syncer::APPS));
334 ASSERT_TRUE(AwaitQuiescence());
336 InstallAppsPendingForSync(GetProfile(0));
337 InstallAppsPendingForSync(GetProfile(1));
338 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
341 // Disable sync for the second client and then install an app on the first
342 // client, then enable sync on the second client. Both clients should have the
343 // same app with identical app and page ordinals.
345 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, DisableSync) {
346 ASSERT_TRUE(SetupSync());
347 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
349 ASSERT_TRUE(GetClient(1)->DisableSyncForAllDatatypes());
350 InstallApp(GetProfile(0), 0);
351 InstallApp(verifier(), 0);
352 ASSERT_TRUE(AwaitCommitActivityCompletion(GetSyncService((0))));
353 ASSERT_TRUE(HasSameAppsAsVerifier(0));
354 ASSERT_FALSE(HasSameAppsAsVerifier(1));
356 ASSERT_TRUE(GetClient(1)->EnableSyncForAllDatatypes());
357 ASSERT_TRUE(AwaitQuiescence());
359 InstallAppsPendingForSync(GetProfile(0));
360 InstallAppsPendingForSync(GetProfile(1));
361 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
364 // Install the same app on both clients, then sync. Change the page ordinal on
365 // one client and sync. Both clients should have the updated page ordinal for
367 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdatePageOrdinal) {
368 ASSERT_TRUE(SetupSync());
369 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
371 syncer::StringOrdinal initial_page =
372 syncer::StringOrdinal::CreateInitialOrdinal();
373 InstallApp(GetProfile(0), 0);
374 InstallApp(GetProfile(1), 0);
375 InstallApp(verifier(), 0);
376 ASSERT_TRUE(AwaitQuiescence());
377 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
379 syncer::StringOrdinal second_page = initial_page.CreateAfter();
380 SetPageOrdinalForApp(GetProfile(0), 0, second_page);
381 SetPageOrdinalForApp(verifier(), 0, second_page);
382 ASSERT_TRUE(AwaitQuiescence());
383 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
386 // Install the same app on both clients, then sync. Change the app launch
387 // ordinal on one client and sync. Both clients should have the updated app
388 // launch ordinal for the app.
389 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateAppLaunchOrdinal) {
390 ASSERT_TRUE(SetupSync());
391 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
393 InstallApp(GetProfile(0), 0);
394 InstallApp(GetProfile(1), 0);
395 InstallApp(verifier(), 0);
396 ASSERT_TRUE(AwaitQuiescence());
397 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
399 syncer::StringOrdinal initial_position =
400 GetAppLaunchOrdinalForApp(GetProfile(0), 0);
402 syncer::StringOrdinal second_position = initial_position.CreateAfter();
403 SetAppLaunchOrdinalForApp(GetProfile(0), 0, second_position);
404 SetAppLaunchOrdinalForApp(verifier(), 0, second_position);
405 ASSERT_TRUE(AwaitQuiescence());
406 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
409 // Adjust the CWS location within a page on the first client and sync. Adjust
410 // which page the CWS appears on and sync. Both clients should have the same
411 // page and app launch ordinal values for the CWS.
412 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateCWSOrdinals) {
413 ASSERT_TRUE(SetupSync());
414 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
416 // Change the app launch ordinal.
417 syncer::StringOrdinal cws_app_launch_ordinal =
418 extensions::ExtensionPrefs::Get(GetProfile(0))
420 ->GetAppLaunchOrdinal(extension_misc::kWebStoreAppId);
421 extensions::ExtensionPrefs::Get(GetProfile(0))
423 ->SetAppLaunchOrdinal(extension_misc::kWebStoreAppId,
424 cws_app_launch_ordinal.CreateAfter());
425 extensions::ExtensionPrefs::Get(verifier())
427 ->SetAppLaunchOrdinal(extension_misc::kWebStoreAppId,
428 cws_app_launch_ordinal.CreateAfter());
429 ASSERT_TRUE(AwaitQuiescence());
430 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
432 // Change the page ordinal.
433 syncer::StringOrdinal cws_page_ordinal =
434 extensions::ExtensionPrefs::Get(GetProfile(1))
436 ->GetPageOrdinal(extension_misc::kWebStoreAppId);
437 extensions::ExtensionPrefs::Get(GetProfile(1))->app_sorting()->SetPageOrdinal(
438 extension_misc::kWebStoreAppId, cws_page_ordinal.CreateAfter());
439 extensions::ExtensionPrefs::Get(verifier())->app_sorting()->SetPageOrdinal(
440 extension_misc::kWebStoreAppId, cws_page_ordinal.CreateAfter());
441 ASSERT_TRUE(AwaitQuiescence());
442 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
445 // Adjust the launch type on the first client and sync. Both clients should
446 // have the same launch type values for the CWS.
447 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UpdateLaunchType) {
448 ASSERT_TRUE(SetupSync());
449 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
451 // Change the launch type to window.
452 extensions::SetLaunchType(GetProfile(1)->GetExtensionService(),
453 extension_misc::kWebStoreAppId,
454 extensions::LAUNCH_TYPE_WINDOW);
455 extensions::SetLaunchType(verifier()->GetExtensionService(),
456 extension_misc::kWebStoreAppId,
457 extensions::LAUNCH_TYPE_WINDOW);
458 ASSERT_TRUE(AwaitQuiescence());
459 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
461 // Change the launch type to regular tab.
462 extensions::SetLaunchType(GetProfile(1)->GetExtensionService(),
463 extension_misc::kWebStoreAppId,
464 extensions::LAUNCH_TYPE_REGULAR);
465 ASSERT_FALSE(HasSameAppsAsVerifier(1));
466 extensions::SetLaunchType(verifier()->GetExtensionService(),
467 extension_misc::kWebStoreAppId,
468 extensions::LAUNCH_TYPE_REGULAR);
469 ASSERT_TRUE(AwaitQuiescence());
470 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
473 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, UnexpectedLaunchType) {
474 ASSERT_TRUE(SetupSync());
475 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
477 extensions::SetLaunchType(GetProfile(1)->GetExtensionService(),
478 extension_misc::kWebStoreAppId,
479 extensions::LAUNCH_TYPE_REGULAR);
480 extensions::SetLaunchType(verifier()->GetExtensionService(),
481 extension_misc::kWebStoreAppId,
482 extensions::LAUNCH_TYPE_REGULAR);
483 ASSERT_TRUE(AwaitQuiescence());
484 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
486 const extensions::Extension* extension =
487 GetProfile(1)->GetExtensionService()->
488 GetInstalledExtension(extension_misc::kWebStoreAppId);
489 ASSERT_TRUE(extension);
491 ExtensionSyncService* extension_sync_service =
492 ExtensionSyncService::Get(GetProfile(1));
494 extensions::AppSyncData original_data(
495 extension_sync_service->GetAppSyncData(*extension));
497 // Create an invalid launch type and ensure it doesn't get down-synced. This
498 // simulates the case of a future launch type being added which old versions
499 // don't yet understand.
500 extensions::AppSyncData invalid_launch_type_data(
502 original_data.extension_sync_data().enabled(),
503 original_data.extension_sync_data().incognito_enabled(),
504 original_data.app_launch_ordinal(),
505 original_data.page_ordinal(),
506 extensions::NUM_LAUNCH_TYPES);
507 extension_sync_service->ProcessAppSyncData(invalid_launch_type_data);
509 // The launch type should remain the same.
510 ASSERT_TRUE(AwaitQuiescence());
511 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
514 IN_PROC_BROWSER_TEST_F(TwoClientAppsSyncTest, BookmarkApp) {
515 ASSERT_TRUE(SetupSync());
516 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
518 size_t num_extensions =
519 GetProfile(0)->GetExtensionService()->extensions()->size();
521 WebApplicationInfo web_app_info;
522 web_app_info.app_url = GURL("http://www.chromium.org");
523 web_app_info.title = base::UTF8ToUTF16("Test name");
524 web_app_info.description = base::UTF8ToUTF16("Test description");
527 content::WindowedNotificationObserver windowed_observer(
528 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
529 content::NotificationService::AllSources());
530 extensions::CreateOrUpdateBookmarkApp(GetProfile(0)->GetExtensionService(),
532 windowed_observer.Wait();
533 EXPECT_EQ(num_extensions,
534 extensions::ExtensionRegistry::Get(GetProfile(0))
535 ->enabled_extensions()
539 content::WindowedNotificationObserver windowed_observer(
540 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
541 content::NotificationService::AllSources());
542 extensions::CreateOrUpdateBookmarkApp(verifier()->GetExtensionService(),
544 windowed_observer.Wait();
545 EXPECT_EQ(num_extensions,
546 extensions::ExtensionRegistry::Get(verifier())
547 ->enabled_extensions()
551 // Wait for the synced app to install.
552 content::WindowedNotificationObserver windowed_observer(
553 chrome::NOTIFICATION_CRX_INSTALLER_DONE,
554 content::NotificationService::AllSources());
555 ASSERT_TRUE(AwaitQuiescence());
556 windowed_observer.Wait();
557 ASSERT_TRUE(AllProfilesHaveSameAppsAsVerifier());
560 // TODO(akalin): Add tests exercising:
561 // - Offline installation/uninstallation behavior
562 // - App-specific properties