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 "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 | 285 |
286 ContentsView* contents_view = main_view->contents_view(); | 286 ContentsView* contents_view = main_view->contents_view(); |
287 contents_view->SetActivePage(contents_view->GetPageIndexForNamedPage( | 287 contents_view->SetActivePage(contents_view->GetPageIndexForNamedPage( |
288 ContentsView::NAMED_PAGE_START)); | 288 ContentsView::NAMED_PAGE_START)); |
289 contents_view->Layout(); | 289 contents_view->Layout(); |
290 EXPECT_FALSE(main_view->search_box_view()->visible()); | 290 EXPECT_FALSE(main_view->search_box_view()->visible()); |
291 EXPECT_TRUE(IsViewAtOrigin(start_page_view)); | 291 EXPECT_TRUE(IsViewAtOrigin(start_page_view)); |
292 EXPECT_FALSE(IsViewAtOrigin(contents_view->apps_container_view())); | 292 EXPECT_FALSE(IsViewAtOrigin(contents_view->apps_container_view())); |
293 EXPECT_EQ(3u, GetVisibleTileItemViews(start_page_view->tile_views())); | 293 EXPECT_EQ(3u, GetVisibleTileItemViews(start_page_view->tile_views())); |
294 | 294 |
295 contents_view->FinishCurrentAnimationForTests(); | |
calamity
2014/06/12 03:26:54
If Layout() sets everything to "where it ends up",
Matt Giuca
2014/06/16 07:20:28
Good point. They previously weren't. Now Layout do
| |
295 contents_view->SetActivePage( | 296 contents_view->SetActivePage( |
296 contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS)); | 297 contents_view->GetPageIndexForNamedPage(ContentsView::NAMED_PAGE_APPS)); |
297 contents_view->Layout(); | 298 contents_view->Layout(); |
298 EXPECT_TRUE(main_view->search_box_view()->visible()); | 299 EXPECT_TRUE(main_view->search_box_view()->visible()); |
299 EXPECT_FALSE(IsViewAtOrigin(start_page_view)); | 300 EXPECT_FALSE(IsViewAtOrigin(start_page_view)); |
300 EXPECT_TRUE(IsViewAtOrigin(contents_view->apps_container_view())); | 301 EXPECT_TRUE(IsViewAtOrigin(contents_view->apps_container_view())); |
301 | 302 |
302 // Check tiles hide and show on deletion and addition. | 303 // Check tiles hide and show on deletion and addition. |
303 model->CreateAndAddItem("Test app"); | 304 model->CreateAndAddItem("Test app"); |
304 EXPECT_EQ(4u, GetVisibleTileItemViews(start_page_view->tile_views())); | 305 EXPECT_EQ(4u, GetVisibleTileItemViews(start_page_view->tile_views())); |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
480 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, | 481 INSTANTIATE_TEST_CASE_P(AppListViewTestAuraInstance, |
481 AppListViewTestAura, | 482 AppListViewTestAura, |
482 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 483 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
483 | 484 |
484 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, | 485 INSTANTIATE_TEST_CASE_P(AppListViewTestDesktopInstance, |
485 AppListViewTestDesktop, | 486 AppListViewTestDesktop, |
486 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); | 487 ::testing::Range<int>(TEST_TYPE_START, TEST_TYPE_END)); |
487 | 488 |
488 } // namespace test | 489 } // namespace test |
489 } // namespace app_list | 490 } // namespace app_list |
OLD | NEW |