Index: chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc |
diff --git a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc |
index bfd3cdda60a51af5de8304e27c6d86b8b0b7fa3a..f9bb80863a15b1984b35b01f42b458d6b3a0a186 100644 |
--- a/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc |
+++ b/chrome/browser/ui/app_list/extension_app_model_builder_unittest.cc |
@@ -32,10 +32,13 @@ const char kPackagedApp2Id[] = "jlklkagmeajbjiobondfhiekepofmljl"; |
// Get a string of all apps in |model| joined with ','. |
std::string GetModelContent(app_list::AppListModel* model) { |
std::string content; |
- for (size_t i = 0; i < model->apps()->item_count(); ++i) { |
- if (i > 0) |
- content += ','; |
- content += model->apps()->GetItemAt(i)->title(); |
+ for (size_t p = 0; p < model->GetNumAppPages(); ++p) { |
+ const app_list::AppListModel::AppItems& apps = model->GetAppItemsForPage(p); |
+ for (size_t i = 0; i < apps.item_count(); ++i) { |
+ if (i > 0) |
+ content += ','; |
+ content += apps.GetItemAt(i)->title(); |
+ } |
} |
return content; |
} |
@@ -285,15 +288,15 @@ TEST_F(ExtensionAppModelBuilderTest, OrdinalConfilicts) { |
TEST_F(ExtensionAppModelBuilderTest, SwitchProfile) { |
ExtensionAppModelBuilder builder(profile_.get(), model_.get(), NULL); |
- EXPECT_EQ(kDefaultAppCount, model_->apps()->item_count()); |
+ EXPECT_EQ(kDefaultAppCount, model_->GetAppItemsForPage(0).item_count()); |
// Switch to a profile with no apps, ensure all apps are removed. |
TestingProfile::Builder profile_builder; |
scoped_ptr<TestingProfile> profile2(profile_builder.Build()); |
builder.SwitchProfile(profile2.get()); |
- EXPECT_EQ(0u, model_->apps()->item_count()); |
+ EXPECT_EQ(0u, model_->GetNumAppPages()); |
// Switch back to the main profile, ensure apps are restored. |
builder.SwitchProfile(profile_.get()); |
- EXPECT_EQ(kDefaultAppCount, model_->apps()->item_count()); |
+ EXPECT_EQ(kDefaultAppCount, model_->GetAppItemsForPage(0).item_count()); |
} |