Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: ui/app_list/views/app_list_view_unittest.cc

Issue 897583002: Ignore updates to app list Most Likely apps when animating off the start page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@doodle_static
Patch Set: fix_test Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/start_page_view.cc » ('j') | ui/app_list/views/start_page_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698