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

Side by Side Diff: chrome/browser/ui/app_list/model_pref_updater_unittest.cc

Issue 648133002: fix newly added OVERRIDEs in chrome/browser/ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chrome/browser/ui/app_list/model_pref_updater.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "chrome/browser/ui/app_list/app_list_prefs.h" 6 #include "chrome/browser/ui/app_list/app_list_prefs.h"
7 #include "chrome/browser/ui/app_list/extension_app_item.h" 7 #include "chrome/browser/ui/app_list/extension_app_item.h"
8 #include "chrome/browser/ui/app_list/model_pref_updater.h" 8 #include "chrome/browser/ui/app_list/model_pref_updater.h"
9 #include "components/pref_registry/testing_pref_service_syncable.h" 9 #include "components/pref_registry/testing_pref_service_syncable.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 #include "ui/app_list/app_list_folder_item.h" 11 #include "ui/app_list/app_list_folder_item.h"
12 #include "ui/app_list/app_list_item.h" 12 #include "ui/app_list/app_list_item.h"
13 #include "ui/app_list/test/app_list_test_model.h" 13 #include "ui/app_list/test/app_list_test_model.h"
14 14
15 namespace app_list { 15 namespace app_list {
16 namespace test { 16 namespace test {
17 17
18 class TestExtensionAppItem : public AppListItem { 18 class TestExtensionAppItem : public AppListItem {
19 public: 19 public:
20 explicit TestExtensionAppItem(const std::string& id) : AppListItem(id) {} 20 explicit TestExtensionAppItem(const std::string& id) : AppListItem(id) {}
21 virtual ~TestExtensionAppItem() {} 21 virtual ~TestExtensionAppItem() {}
22 22
23 virtual const char* GetItemType() const OVERRIDE { 23 virtual const char* GetItemType() const override {
24 return ExtensionAppItem::kItemType; 24 return ExtensionAppItem::kItemType;
25 } 25 }
26 26
27 private: 27 private:
28 DISALLOW_COPY_AND_ASSIGN(TestExtensionAppItem); 28 DISALLOW_COPY_AND_ASSIGN(TestExtensionAppItem);
29 }; 29 };
30 30
31 class ModelPrefUpdaterTest : public testing::Test { 31 class ModelPrefUpdaterTest : public testing::Test {
32 public: 32 public:
33 ModelPrefUpdaterTest() {} 33 ModelPrefUpdaterTest() {}
34 virtual ~ModelPrefUpdaterTest() {} 34 virtual ~ModelPrefUpdaterTest() {}
35 35
36 virtual void SetUp() OVERRIDE { 36 virtual void SetUp() override {
37 AppListPrefs::RegisterProfilePrefs(pref_service_.registry()); 37 AppListPrefs::RegisterProfilePrefs(pref_service_.registry());
38 prefs_.reset(AppListPrefs::Create(&pref_service_)); 38 prefs_.reset(AppListPrefs::Create(&pref_service_));
39 model_.reset(new AppListTestModel()); 39 model_.reset(new AppListTestModel());
40 pref_updater_.reset(new ModelPrefUpdater(prefs_.get(), model_.get())); 40 pref_updater_.reset(new ModelPrefUpdater(prefs_.get(), model_.get()));
41 } 41 }
42 42
43 AppListTestModel* model() { return model_.get(); } 43 AppListTestModel* model() { return model_.get(); }
44 44
45 AppListPrefs* prefs() { return prefs_.get(); } 45 AppListPrefs* prefs() { return prefs_.get(); }
46 46
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_EQ(folder->id(), item->folder_id()); 93 EXPECT_EQ(folder->id(), item->folder_id());
94 94
95 prefs()->GetAllAppListInfos(&infos); 95 prefs()->GetAllAppListInfos(&infos);
96 EXPECT_EQ(2u, infos.size()); 96 EXPECT_EQ(2u, infos.size());
97 EXPECT_TRUE(AppListItemMatchesPrefs(folder)); 97 EXPECT_TRUE(AppListItemMatchesPrefs(folder));
98 EXPECT_TRUE(AppListItemMatchesPrefs(item)); 98 EXPECT_TRUE(AppListItemMatchesPrefs(item));
99 } 99 }
100 100
101 } // namespace test 101 } // namespace test
102 } // namespace app_list 102 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/model_pref_updater.h ('k') | chrome/browser/ui/browser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698