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

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

Issue 2787693002: Remove more dead app list code. (Closed)
Patch Set: updated comment Created 3 years, 8 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
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 generator.MoveMouseTo(item1->GetBoundsInScreen().CenterPoint()); 286 generator.MoveMouseTo(item1->GetBoundsInScreen().CenterPoint());
287 EXPECT_FALSE(item0->is_highlighted()); 287 EXPECT_FALSE(item0->is_highlighted());
288 EXPECT_TRUE(item1->is_highlighted()); 288 EXPECT_TRUE(item1->is_highlighted());
289 289
290 generator.MoveMouseTo(gfx::Point(-1, -1)); 290 generator.MoveMouseTo(gfx::Point(-1, -1));
291 EXPECT_FALSE(item0->is_highlighted()); 291 EXPECT_FALSE(item0->is_highlighted());
292 EXPECT_FALSE(item1->is_highlighted()); 292 EXPECT_FALSE(item1->is_highlighted());
293 } 293 }
294 294
295 // No touch on desktop Mac. Tracked in http://crbug.com/445520.
296 #if defined(OS_MACOSX) && !defined(USE_AURA)
297 #define MAYBE_TapGestureToHighlight DISABLED_TapGestureToHighlight
298 #else
299 #define MAYBE_TapGestureToHighlight TapGestureToHighlight
300 #endif
301
302 // Tests that tap gesture on app item highlights it 295 // Tests that tap gesture on app item highlights it
303 TEST_F(AppListMainViewTest, MAYBE_TapGestureToHighlight) { 296 TEST_F(AppListMainViewTest, TapGestureToHighlight) {
304 delegate_->GetTestModel()->PopulateApps(1); 297 delegate_->GetTestModel()->PopulateApps(1);
305 main_widget_->Show(); 298 main_widget_->Show();
306 299
307 ui::test::EventGenerator generator(GetContext(), 300 ui::test::EventGenerator generator(GetContext(),
308 main_widget_->GetNativeWindow()); 301 main_widget_->GetNativeWindow());
309 AppListItemView* item = RootViewModel()->view_at(0); 302 AppListItemView* item = RootViewModel()->view_at(0);
310 303
311 // Switch to All Apps page. 304 // Switch to All Apps page.
312 GetContentsView()->SetActiveState(AppListModel::STATE_APPS); 305 GetContentsView()->SetActiveState(AppListModel::STATE_APPS);
313 GetContentsView()->Layout(); 306 GetContentsView()->Layout();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 // The app list model should remain unchanged. 442 // The app list model should remain unchanged.
450 EXPECT_EQ(1, FolderViewModel()->view_size()); 443 EXPECT_EQ(1, FolderViewModel()->view_size());
451 EXPECT_EQ(2, RootViewModel()->view_size()); 444 EXPECT_EQ(2, RootViewModel()->view_size());
452 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id()); 445 EXPECT_EQ(folder_id, RootGridView()->GetItemViewAt(0)->item()->id());
453 EXPECT_NE(nullptr, 446 EXPECT_NE(nullptr,
454 delegate_->GetTestModel()->FindFolderItem("single_item_folder")); 447 delegate_->GetTestModel()->FindFolderItem("single_item_folder"));
455 } 448 }
456 449
457 } // namespace test 450 } // namespace test
458 } // namespace app_list 451 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_item_view.cc ('k') | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698