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

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

Issue 2143893002: Purge the App Launcher code from Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment Created 4 years, 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_main_view.h" 5 #include "ui/app_list/views/app_list_main_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 AppListItemView* folder_item_view = 200 AppListItemView* folder_item_view =
201 static_cast<AppListItemView*>(RootViewModel()->view_at(0)); 201 static_cast<AppListItemView*>(RootViewModel()->view_at(0));
202 EXPECT_EQ(folder_item_view->item(), folder_item); 202 EXPECT_EQ(folder_item_view->item(), folder_item);
203 203
204 // Click on the folder to open it. 204 // Click on the folder to open it.
205 EXPECT_FALSE(FolderView()->visible()); 205 EXPECT_FALSE(FolderView()->visible());
206 SimulateClick(folder_item_view); 206 SimulateClick(folder_item_view);
207 base::RunLoop().RunUntilIdle(); 207 base::RunLoop().RunUntilIdle();
208 EXPECT_TRUE(FolderView()->visible()); 208 EXPECT_TRUE(FolderView()->visible());
209 209
210 #if defined(OS_WIN)
211 AppsGridViewTestApi folder_grid_view_test_api(FolderGridView());
212 folder_grid_view_test_api.DisableSynchronousDrag();
213 #endif
214 return folder_item_view; 210 return folder_item_view;
215 } 211 }
216 212
217 AppListItemView* StartDragForReparent(int index_in_folder) { 213 AppListItemView* StartDragForReparent(int index_in_folder) {
218 // Start to drag the item in folder. 214 // Start to drag the item in folder.
219 views::View* item_view = FolderViewModel()->view_at(index_in_folder); 215 views::View* item_view = FolderViewModel()->view_at(index_in_folder);
220 gfx::Point point = item_view->bounds().CenterPoint(); 216 gfx::Point point = item_view->bounds().CenterPoint();
221 AppListItemView* dragged = 217 AppListItemView* dragged =
222 SimulateInitiateDrag(FolderGridView(), AppsGridView::MOUSE, point); 218 SimulateInitiateDrag(FolderGridView(), AppsGridView::MOUSE, point);
223 EXPECT_EQ(item_view, dragged); 219 EXPECT_EQ(item_view, dragged);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // The app list model should remain unchanged. 453 // The app list model should remain unchanged.
458 EXPECT_EQ(1, FolderViewModel()->view_size()); 454 EXPECT_EQ(1, FolderViewModel()->view_size());
459 EXPECT_EQ(2, RootViewModel()->view_size()); 455 EXPECT_EQ(2, RootViewModel()->view_size());
460 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id()); 456 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id());
461 EXPECT_NE(nullptr, 457 EXPECT_NE(nullptr,
462 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 458 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
463 } 459 }
464 460
465 } // namespace test 461 } // namespace test
466 } // namespace app_list 462 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698