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

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

Issue 11275320: app_list: Make over scroll animation faster. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/pagination_model.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 }; 99 };
100 100
101 class PaginationModelTest : public testing::Test { 101 class PaginationModelTest : public testing::Test {
102 public: 102 public:
103 PaginationModelTest() {} 103 PaginationModelTest() {}
104 virtual ~PaginationModelTest() {} 104 virtual ~PaginationModelTest() {}
105 105
106 // testing::Test overrides: 106 // testing::Test overrides:
107 virtual void SetUp() OVERRIDE { 107 virtual void SetUp() OVERRIDE {
108 pagination_.SetTotalPages(5); 108 pagination_.SetTotalPages(5);
109 pagination_.SetTransitionDuration(1); 109 pagination_.SetTransitionDurations(1, 1);
110 observer_.set_model(&pagination_); 110 observer_.set_model(&pagination_);
111 pagination_.AddObserver(&observer_); 111 pagination_.AddObserver(&observer_);
112 } 112 }
113 virtual void TearDown() OVERRIDE { 113 virtual void TearDown() OVERRIDE {
114 pagination_.RemoveObserver(&observer_); 114 pagination_.RemoveObserver(&observer_);
115 observer_.set_model(NULL); 115 observer_.set_model(NULL);
116 } 116 }
117 117
118 protected: 118 protected:
119 void SetStartPageAndExpects(int start_page, 119 void SetStartPageAndExpects(int start_page,
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 EXPECT_EQ(1, pagination_.selected_page()); 381 EXPECT_EQ(1, pagination_.selected_page());
382 382
383 // But if the currently selected_page exceeds the total number of pages, 383 // But if the currently selected_page exceeds the total number of pages,
384 // it automatically switches to the last page. 384 // it automatically switches to the last page.
385 pagination_.SetTotalPages(1); 385 pagination_.SetTotalPages(1);
386 EXPECT_EQ(0, pagination_.selected_page()); 386 EXPECT_EQ(0, pagination_.selected_page());
387 } 387 }
388 388
389 } // namespace test 389 } // namespace test
390 } // namespace app_list 390 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/pagination_model.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698