OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/app_list_view.h" | 5 #include "ui/app_list/views/app_list_view.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // apps grid view. | 466 // apps grid view. |
467 SimulateClick(all_apps_button); | 467 SimulateClick(all_apps_button); |
468 main_view->contents_view()->Layout(); | 468 main_view->contents_view()->Layout(); |
469 EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS)); | 469 EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS)); |
470 | 470 |
471 // Hiding and showing the search box should not affect the app list's | 471 // Hiding and showing the search box should not affect the app list's |
472 // preferred size. This is a regression test for http://crbug.com/386912. | 472 // preferred size. This is a regression test for http://crbug.com/386912. |
473 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); | 473 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); |
474 | 474 |
475 // Check tiles hide and show on deletion and addition. | 475 // Check tiles hide and show on deletion and addition. |
| 476 EXPECT_TRUE(SetAppListState(AppListModel::STATE_START)); |
476 model->results()->Add(new TestStartPageSearchResult()); | 477 model->results()->Add(new TestStartPageSearchResult()); |
477 start_page_view->UpdateForTesting(); | 478 start_page_view->UpdateForTesting(); |
478 EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views())); | 479 EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views())); |
479 model->results()->DeleteAll(); | 480 model->results()->DeleteAll(); |
480 start_page_view->UpdateForTesting(); | 481 start_page_view->UpdateForTesting(); |
481 EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views())); | 482 EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views())); |
482 } else { | 483 } else { |
483 EXPECT_EQ(NULL, start_page_view); | 484 EXPECT_EQ(NULL, start_page_view); |
484 } | 485 } |
485 | 486 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
828 AppListViewTestAura, | 829 AppListViewTestAura, |
829 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 830 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
830 #endif | 831 #endif |
831 | 832 |
832 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 833 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
833 AppListViewTestDesktop, | 834 AppListViewTestDesktop, |
834 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 835 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
835 | 836 |
836 } // namespace test | 837 } // namespace test |
837 } // namespace app_list | 838 } // namespace app_list |
OLD | NEW |