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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 // apps grid view. | 465 // apps grid view. |
466 SimulateClick(all_apps_button); | 466 SimulateClick(all_apps_button); |
467 main_view->contents_view()->Layout(); | 467 main_view->contents_view()->Layout(); |
468 EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS)); | 468 EXPECT_TRUE(IsStateShown(AppListModel::STATE_APPS)); |
469 | 469 |
470 // Hiding and showing the search box should not affect the app list's | 470 // Hiding and showing the search box should not affect the app list's |
471 // preferred size. This is a regression test for http://crbug.com/386912. | 471 // preferred size. This is a regression test for http://crbug.com/386912. |
472 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); | 472 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); |
473 | 473 |
474 // Check tiles hide and show on deletion and addition. | 474 // Check tiles hide and show on deletion and addition. |
| 475 EXPECT_TRUE(SetAppListState(AppListModel::STATE_START)); |
475 model->results()->Add(new TestStartPageSearchResult()); | 476 model->results()->Add(new TestStartPageSearchResult()); |
476 start_page_view->UpdateForTesting(); | 477 start_page_view->UpdateForTesting(); |
477 EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views())); | 478 EXPECT_EQ(1u, GetVisibleViews(start_page_view->tile_views())); |
478 model->results()->DeleteAll(); | 479 model->results()->DeleteAll(); |
479 start_page_view->UpdateForTesting(); | 480 start_page_view->UpdateForTesting(); |
480 EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views())); | 481 EXPECT_EQ(0u, GetVisibleViews(start_page_view->tile_views())); |
481 } else { | 482 } else { |
482 EXPECT_EQ(NULL, start_page_view); | 483 EXPECT_EQ(NULL, start_page_view); |
483 } | 484 } |
484 | 485 |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 AppListViewTestAura, | 823 AppListViewTestAura, |
823 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 824 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
824 #endif | 825 #endif |
825 | 826 |
826 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 827 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
827 AppListViewTestDesktop, | 828 AppListViewTestDesktop, |
828 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 829 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
829 | 830 |
830 } // namespace test | 831 } // namespace test |
831 } // namespace app_list | 832 } // namespace app_list |
OLD | NEW |