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

Side by Side Diff: ui/app_list/pagination_model_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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/pagination_model.h" 5 #include "ui/app_list/pagination_model.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 int transition_page_; 105 int transition_page_;
106 106
107 std::string selected_pages_; 107 std::string selected_pages_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(TestPaginationModelObserver); 109 DISALLOW_COPY_AND_ASSIGN(TestPaginationModelObserver);
110 }; 110 };
111 111
112 class PaginationModelTest : public testing::Test { 112 class PaginationModelTest : public testing::Test {
113 public: 113 public:
114 PaginationModelTest() {} 114 PaginationModelTest() {}
115 virtual ~PaginationModelTest() {} 115 ~PaginationModelTest() override {}
116 116
117 // testing::Test overrides: 117 // testing::Test overrides:
118 virtual void SetUp() override { 118 void SetUp() override {
119 pagination_.SetTotalPages(5); 119 pagination_.SetTotalPages(5);
120 pagination_.SetTransitionDurations(1, 1); 120 pagination_.SetTransitionDurations(1, 1);
121 observer_.set_model(&pagination_); 121 observer_.set_model(&pagination_);
122 pagination_.AddObserver(&observer_); 122 pagination_.AddObserver(&observer_);
123 } 123 }
124 virtual void TearDown() override { 124 void TearDown() override {
125 pagination_.RemoveObserver(&observer_); 125 pagination_.RemoveObserver(&observer_);
126 observer_.set_model(NULL); 126 observer_.set_model(NULL);
127 } 127 }
128 128
129 protected: 129 protected:
130 void SetStartPageAndExpects(int start_page, 130 void SetStartPageAndExpects(int start_page,
131 int expected_selection, 131 int expected_selection,
132 int expected_transition_start, 132 int expected_transition_start,
133 int expected_transition_end) { 133 int expected_transition_end) {
134 observer_.set_expected_page_selection(0); 134 observer_.set_expected_page_selection(0);
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 EXPECT_EQ(1, pagination_.selected_page()); 423 EXPECT_EQ(1, pagination_.selected_page());
424 424
425 // But if the currently selected_page exceeds the total number of pages, 425 // But if the currently selected_page exceeds the total number of pages,
426 // it automatically switches to the last page. 426 // it automatically switches to the last page.
427 pagination_.SetTotalPages(1); 427 pagination_.SetTotalPages(1);
428 EXPECT_EQ(0, pagination_.selected_page()); 428 EXPECT_EQ(0, pagination_.selected_page());
429 } 429 }
430 430
431 } // namespace test 431 } // namespace test
432 } // namespace app_list 432 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/demo/app_list_demo_views.cc ('k') | ui/app_list/search/history_data_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698