OLD | NEW |
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" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "base/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/app_list/pagination_model_observer.h" | 14 #include "ui/app_list/pagination_model_observer.h" |
15 | 15 |
16 namespace app_list { | 16 namespace app_list { |
17 namespace test { | 17 namespace test { |
18 | 18 |
19 class TestPaginationModelObserver : public PaginationModelObserver { | 19 class TestPaginationModelObserver : public PaginationModelObserver { |
20 public: | 20 public: |
21 TestPaginationModelObserver() | 21 TestPaginationModelObserver() |
22 : model_(NULL), | 22 : model_(NULL), |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 EXPECT_EQ(1, pagination_.selected_page()); | 421 EXPECT_EQ(1, pagination_.selected_page()); |
422 | 422 |
423 // But if the currently selected_page exceeds the total number of pages, | 423 // But if the currently selected_page exceeds the total number of pages, |
424 // it automatically switches to the last page. | 424 // it automatically switches to the last page. |
425 pagination_.SetTotalPages(1); | 425 pagination_.SetTotalPages(1); |
426 EXPECT_EQ(0, pagination_.selected_page()); | 426 EXPECT_EQ(0, pagination_.selected_page()); |
427 } | 427 } |
428 | 428 |
429 } // namespace test | 429 } // namespace test |
430 } // namespace app_list | 430 } // namespace app_list |
OLD | NEW |