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

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

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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 | « ui/app_list/app_list_folder_item.cc ('k') | ui/app_list/app_list_menu.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 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"
11 #include "ui/app_list/app_list_item.h" 11 #include "ui/app_list/app_list_item.h"
12 #include "ui/app_list/app_list_item_list_observer.h" 12 #include "ui/app_list/app_list_item_list_observer.h"
13 13
14 namespace app_list { 14 namespace app_list {
15 15
16 namespace { 16 namespace {
17 17
18 class TestObserver : public AppListItemListObserver { 18 class TestObserver : public AppListItemListObserver {
19 public: 19 public:
20 TestObserver() : items_added_(0), items_removed_(0), items_moved_(0) {} 20 TestObserver() : items_added_(0), items_removed_(0), items_moved_(0) {}
21 21
22 virtual ~TestObserver() { 22 virtual ~TestObserver() {
23 } 23 }
24 24
25 // AppListItemListObserver overriden: 25 // AppListItemListObserver overriden:
26 virtual void OnListItemAdded(size_t index, AppListItem* item) OVERRIDE { 26 virtual void OnListItemAdded(size_t index, AppListItem* item) override {
27 ++items_added_; 27 ++items_added_;
28 } 28 }
29 29
30 virtual void OnListItemRemoved(size_t index, AppListItem* item) OVERRIDE { 30 virtual void OnListItemRemoved(size_t index, AppListItem* item) override {
31 ++items_removed_; 31 ++items_removed_;
32 } 32 }
33 33
34 virtual void OnListItemMoved(size_t from_index, 34 virtual void OnListItemMoved(size_t from_index,
35 size_t to_index, 35 size_t to_index,
36 AppListItem* item) OVERRIDE { 36 AppListItem* item) override {
37 ++items_moved_; 37 ++items_moved_;
38 } 38 }
39 39
40 size_t items_added() const { return items_added_; } 40 size_t items_added() const { return items_added_; }
41 size_t items_removed() const { return items_removed_; } 41 size_t items_removed() const { return items_removed_; }
42 size_t items_moved() const { return items_moved_; } 42 size_t items_moved() const { return items_moved_; }
43 43
44 void ResetCounts() { 44 void ResetCounts() {
45 items_added_ = 0; 45 items_added_ = 0;
46 items_removed_ = 0; 46 items_removed_ = 0;
(...skipping 13 matching lines...) Expand all
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 class AppListItemListTest : public testing::Test { 64 class AppListItemListTest : public testing::Test {
65 public: 65 public:
66 AppListItemListTest() {} 66 AppListItemListTest() {}
67 virtual ~AppListItemListTest() {} 67 virtual ~AppListItemListTest() {}
68 68
69 // testing::Test overrides: 69 // testing::Test overrides:
70 virtual void SetUp() OVERRIDE { 70 virtual void SetUp() override {
71 item_list_.AddObserver(&observer_); 71 item_list_.AddObserver(&observer_);
72 } 72 }
73 73
74 virtual void TearDown() OVERRIDE { 74 virtual void TearDown() override {
75 item_list_.RemoveObserver(&observer_); 75 item_list_.RemoveObserver(&observer_);
76 } 76 }
77 77
78 protected: 78 protected:
79 AppListItem* FindItem(const std::string& id) { 79 AppListItem* FindItem(const std::string& id) {
80 return item_list_.FindItem(id); 80 return item_list_.FindItem(id);
81 } 81 }
82 82
83 bool FindItemIndex(const std::string& id, size_t* index) { 83 bool FindItemIndex(const std::string& id, size_t* index) {
84 return item_list_.FindItemIndex(id, index); 84 return item_list_.FindItemIndex(id, index);
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 EXPECT_TRUE(VerifyItemListOrdinals()); 360 EXPECT_TRUE(VerifyItemListOrdinals());
361 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1)); 361 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1));
362 // last -> last 362 // last -> last
363 item_list_.SetItemPosition(item_list_.item_at(3), 363 item_list_.SetItemPosition(item_list_.item_at(3),
364 item_list_.item_at(3)->position().CreateAfter()); 364 item_list_.item_at(3)->position().CreateAfter());
365 EXPECT_TRUE(VerifyItemListOrdinals()); 365 EXPECT_TRUE(VerifyItemListOrdinals());
366 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1)); 366 EXPECT_TRUE(VerifyItemOrder4(2, 0, 3, 1));
367 } 367 }
368 368
369 } // namespace app_list 369 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_folder_item.cc ('k') | ui/app_list/app_list_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698