| 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 "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 EXPECT_TRUE(main_view->search_box_view()->visible()); | 329 EXPECT_TRUE(main_view->search_box_view()->visible()); |
| 330 | 330 |
| 331 // Hiding and showing the search box should not affect the app list's | 331 // Hiding and showing the search box should not affect the app list's |
| 332 // preferred size. This is a regression test for http://crbug.com/386912. | 332 // preferred size. This is a regression test for http://crbug.com/386912. |
| 333 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); | 333 EXPECT_EQ(view_size.ToString(), view_->GetPreferredSize().ToString()); |
| 334 | 334 |
| 335 // Check tiles hide and show on deletion and addition. | 335 // Check tiles hide and show on deletion and addition. |
| 336 model->results()->Add(new TestTileSearchResult()); | 336 model->results()->Add(new TestTileSearchResult()); |
| 337 start_page_view->UpdateForTesting(); | 337 start_page_view->UpdateForTesting(); |
| 338 EXPECT_EQ(1u, GetVisibleTileItemViews(start_page_view->tile_views())); | 338 EXPECT_EQ(1u, GetVisibleTileItemViews(start_page_view->tile_views())); |
| 339 model->results()->RemoveAll(); | 339 model->results()->DeleteAll(); |
| 340 start_page_view->UpdateForTesting(); | 340 start_page_view->UpdateForTesting(); |
| 341 EXPECT_EQ(0u, GetVisibleTileItemViews(start_page_view->tile_views())); | 341 EXPECT_EQ(0u, GetVisibleTileItemViews(start_page_view->tile_views())); |
| 342 } else { | 342 } else { |
| 343 EXPECT_EQ(NULL, start_page_view); | 343 EXPECT_EQ(NULL, start_page_view); |
| 344 } | 344 } |
| 345 | 345 |
| 346 Close(); | 346 Close(); |
| 347 } | 347 } |
| 348 | 348 |
| 349 void AppListViewTestContext::RunPageSwitchingAnimationTest() { | 349 void AppListViewTestContext::RunPageSwitchingAnimationTest() { |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, | 686 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, |
| 687 AppListViewTestAura, | 687 AppListViewTestAura, |
| 688 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 688 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
| 689 | 689 |
| 690 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 690 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
| 691 AppListViewTestDesktop, | 691 AppListViewTestDesktop, |
| 692 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 692 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
| 693 | 693 |
| 694 } // namespace test | 694 } // namespace test |
| 695 } // namespace app_list | 695 } // namespace app_list |
| OLD | NEW |