Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: chrome/browser/sync/test/integration/sync_app_list_helper.cc

Issue 118463002: Sync removal of Default apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h" 5 #include "chrome/browser/sync/test/integration/sync_app_list_helper.h"
6 6
7 #include "chrome/browser/extensions/extension_service.h" 7 #include "chrome/browser/extensions/extension_service.h"
8 #include "chrome/browser/extensions/extension_system.h" 8 #include "chrome/browser/extensions/extension_system.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" 10 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 test_->verifier())->InitForRegularProfile(true); 47 test_->verifier())->InitForRegularProfile(true);
48 48
49 setup_completed_ = true; 49 setup_completed_ = true;
50 } 50 }
51 51
52 bool SyncAppListHelper::AppListMatchesVerifier(Profile* profile) { 52 bool SyncAppListHelper::AppListMatchesVerifier(Profile* profile) {
53 AppListSyncableService* service = 53 AppListSyncableService* service =
54 AppListSyncableServiceFactory::GetForProfile(profile); 54 AppListSyncableServiceFactory::GetForProfile(profile);
55 AppListSyncableService* verifier = 55 AppListSyncableService* verifier =
56 AppListSyncableServiceFactory::GetForProfile(test_->verifier()); 56 AppListSyncableServiceFactory::GetForProfile(test_->verifier());
57 if (service->GetNumSyncItemsForTest() != 57 // Note: sync item entries may not exist in verifier, but item lists should
58 verifier->GetNumSyncItemsForTest()) { 58 // match.
59 LOG(ERROR) << "Sync item count: "
60 << service->GetNumSyncItemsForTest()
61 << " != " << verifier->GetNumSyncItemsForTest();
62 return false;
63 }
64 if (service->model()->item_list()->item_count() != 59 if (service->model()->item_list()->item_count() !=
65 verifier->model()->item_list()->item_count()) { 60 verifier->model()->item_list()->item_count()) {
66 LOG(ERROR) << "Model item count: " 61 LOG(ERROR) << "Model item count: "
67 << service->model()->item_list()->item_count() 62 << service->model()->item_list()->item_count()
68 << " != " << verifier->model()->item_list()->item_count(); 63 << " != " << verifier->model()->item_list()->item_count();
69 return false; 64 return false;
70 } 65 }
71 bool res = true; 66 bool res = true;
72 for (size_t i = 0; i < service->model()->item_list()->item_count(); ++i) { 67 for (size_t i = 0; i < service->model()->item_list()->item_count(); ++i) {
73 AppListItem* item1 = service->model()->item_list()->item_at(i); 68 AppListItem* item1 = service->model()->item_list()->item_at(i);
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 extensions::AppSorting* s = 133 extensions::AppSorting* s =
139 extensions::ExtensionSystem::Get(profile)->extension_service()-> 134 extensions::ExtensionSystem::Get(profile)->extension_service()->
140 extension_prefs()->app_sorting(); 135 extension_prefs()->app_sorting();
141 std::string id = item->id(); 136 std::string id = item->id();
142 VLOG(1) 137 VLOG(1)
143 << "Item(" << i << "): " << item->ToDebugString() 138 << "Item(" << i << "): " << item->ToDebugString()
144 << " Page: " << s->GetPageOrdinal(id).ToDebugString().substr(0, 8) 139 << " Page: " << s->GetPageOrdinal(id).ToDebugString().substr(0, 8)
145 << " Item: " << s->GetAppLaunchOrdinal(id).ToDebugString().substr(0, 8); 140 << " Item: " << s->GetAppLaunchOrdinal(id).ToDebugString().substr(0, 8);
146 } 141 }
147 } 142 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/sync/test/integration/two_client_app_list_sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698