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

Side by Side Diff: chrome/browser/ui/views/aura/app_list/app_list_model_builder_unittest.cc

Issue 9033007: Rename the aura_shell namespace to ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ash/app_list/app_list_item_group_model.h" 5 #include "ash/app_list/app_list_item_group_model.h"
6 #include "ash/app_list/app_list_item_model.h" 6 #include "ash/app_list/app_list_item_model.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/ui/views/aura/app_list/app_list_model_builder.h" 9 #include "chrome/browser/ui/views/aura/app_list/app_list_model_builder.h"
10 #include "chrome/browser/extensions/extension_service_unittest.h" 10 #include "chrome/browser/extensions/extension_service_unittest.h"
(...skipping 15 matching lines...) Expand all
26 FilePath pref_path = source_install_dir 26 FilePath pref_path = source_install_dir
27 .DirName() 27 .DirName()
28 .AppendASCII("Preferences"); 28 .AppendASCII("Preferences");
29 InitializeInstalledExtensionService(pref_path, source_install_dir); 29 InitializeInstalledExtensionService(pref_path, source_install_dir);
30 service_->Init(); 30 service_->Init();
31 31
32 // There should be 4 extensions in the test profile. 32 // There should be 4 extensions in the test profile.
33 const ExtensionSet* extensions = service_->extensions(); 33 const ExtensionSet* extensions = service_->extensions();
34 ASSERT_EQ(static_cast<size_t>(4), extensions->size()); 34 ASSERT_EQ(static_cast<size_t>(4), extensions->size());
35 35
36 scoped_ptr<aura_shell::AppListModel> model(new aura_shell::AppListModel()); 36 scoped_ptr<ash::AppListModel> model(new ash::AppListModel());
37 AppListModelBuilder builder(profile_.get(), model.get()); 37 AppListModelBuilder builder(profile_.get(), model.get());
38 builder.GetExtensionApps(); 38 builder.GetExtensionApps();
39 39
40 // Expect to have two app groups. 40 // Expect to have two app groups.
41 EXPECT_EQ(2, model->group_count()); 41 EXPECT_EQ(2, model->group_count());
42 42
43 // Two packaged apps are on the first page and hosted app on the 2nd page. 43 // Two packaged apps are on the first page and hosted app on the 2nd page.
44 aura_shell::AppListItemGroupModel* group1 = model->GetGroup(0); 44 ash::AppListItemGroupModel* group1 = model->GetGroup(0);
45 EXPECT_EQ("Packaged App 1", group1->GetItem(0)->title()); 45 EXPECT_EQ("Packaged App 1", group1->GetItem(0)->title());
46 EXPECT_EQ("Packaged App 2", group1->GetItem(1)->title()); 46 EXPECT_EQ("Packaged App 2", group1->GetItem(1)->title());
47 47
48 aura_shell::AppListItemGroupModel* group2 = model->GetGroup(1); 48 ash::AppListItemGroupModel* group2 = model->GetGroup(1);
49 EXPECT_EQ("Hosted App", group2->GetItem(0)->title()); 49 EXPECT_EQ("Hosted App", group2->GetItem(0)->title());
50 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698