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

Side by Side Diff: ui/app_list/app_list_item_list_unittest.cc

Issue 681873002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | ui/app_list/app_list_model_unittest.cc » ('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 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 "ui/app_list/app_list_item_list.h" 5 #include "ui/app_list/app_list_item_list.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/app_list/app_list_folder_item.h" 10 #include "ui/app_list/app_list_folder_item.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 std::string GetItemId(int id) { 57 std::string GetItemId(int id) {
58 return base::StringPrintf("Item %d", id); 58 return base::StringPrintf("Item %d", id);
59 } 59 }
60 60
61 } // namespace 61 } // namespace
62 62
63 class AppListItemListTest : public testing::Test { 63 class AppListItemListTest : public testing::Test {
64 public: 64 public:
65 AppListItemListTest() {} 65 AppListItemListTest() {}
66 virtual ~AppListItemListTest() {} 66 ~AppListItemListTest() override {}
67 67
68 // testing::Test overrides: 68 // testing::Test overrides:
69 virtual void SetUp() override { 69 void SetUp() override { item_list_.AddObserver(&observer_); }
70 item_list_.AddObserver(&observer_);
71 }
72 70
73 virtual void TearDown() override { 71 void TearDown() override { item_list_.RemoveObserver(&observer_); }
74 item_list_.RemoveObserver(&observer_);
75 }
76 72
77 protected: 73 protected:
78 AppListItem* FindItem(const std::string& id) { 74 AppListItem* FindItem(const std::string& id) {
79 return item_list_.FindItem(id); 75 return item_list_.FindItem(id);
80 } 76 }
81 77
82 bool FindItemIndex(const std::string& id, size_t* index) { 78 bool FindItemIndex(const std::string& id, size_t* index) {
83 return item_list_.FindItemIndex(id, index); 79 return item_list_.FindItemIndex(id, index);
84 } 80 }
85 81
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 EXPECT_TRUE(VerifyItemListOrdinals()); 355 EXPECT_TRUE(VerifyItemListOrdinals());
360 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1)); 356 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1));
361 // last -> last 357 // last -> last
362 item_list_.SetItemPosition(item_list_.item_at(3), 358 item_list_.SetItemPosition(item_list_.item_at(3),
363 item_list_.item_at(3)->position().CreateAfter()); 359 item_list_.item_at(3)->position().CreateAfter());
364 EXPECT_TRUE(VerifyItemListOrdinals()); 360 EXPECT_TRUE(VerifyItemListOrdinals());
365 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1)); 361 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1));
366 } 362 }
367 363
368 } // namespace app_list 364 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/app_list_model_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698