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

Side by Side Diff: ui/app_list/apps_grid_view_unittest.cc

Issue 11275320: app_list: Make over scroll animation faster. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/contents_view.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/apps_grid_view.h" 5 #include "ui/app_list/apps_grid_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 SimulateDrag(AppsGridView::MOUSE, from, to); 281 SimulateDrag(AppsGridView::MOUSE, from, to);
282 model_->apps()->Add(CreateItem(std::string("Extra"))); 282 model_->apps()->Add(CreateItem(std::string("Extra")));
283 apps_grid_view_->EndDrag(false); 283 apps_grid_view_->EndDrag(false);
284 EXPECT_EQ(std::string("Item 1,Item 2,Item 3,Extra"), 284 EXPECT_EQ(std::string("Item 1,Item 2,Item 3,Extra"),
285 GetModelContent()); 285 GetModelContent());
286 test_api_->LayoutToIdealBounds(); 286 test_api_->LayoutToIdealBounds();
287 } 287 }
288 288
289 TEST_F(AppsGridViewTest, MouseDragFlipPage) { 289 TEST_F(AppsGridViewTest, MouseDragFlipPage) {
290 test_api_->SetPageFlipDelay(10); 290 test_api_->SetPageFlipDelay(10);
291 pagination_model_->SetTransitionDuration(10); 291 pagination_model_->SetTransitionDurations(10, 10);
292 292
293 PageFlipWaiter page_flip_waiter(&message_loop_, 293 PageFlipWaiter page_flip_waiter(&message_loop_,
294 pagination_model_.get()); 294 pagination_model_.get());
295 295
296 const int kPages = 3; 296 const int kPages = 3;
297 PopulateApps(kPages * kTilesPerPage); 297 PopulateApps(kPages * kTilesPerPage);
298 EXPECT_EQ(kPages, pagination_model_->total_pages()); 298 EXPECT_EQ(kPages, pagination_model_->total_pages());
299 EXPECT_EQ(0, pagination_model_->selected_page()); 299 EXPECT_EQ(0, pagination_model_->selected_page());
300 300
301 gfx::Point from = GetItemTileRectAt(0, 0).CenterPoint(); 301 gfx::Point from = GetItemTileRectAt(0, 0).CenterPoint();
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 SimulateDrag(AppsGridView::MOUSE, mouse_from, mouse_to); 361 SimulateDrag(AppsGridView::MOUSE, mouse_from, mouse_to);
362 // Finishes the drag and touch drag wins. 362 // Finishes the drag and touch drag wins.
363 apps_grid_view_->EndDrag(false); 363 apps_grid_view_->EndDrag(false);
364 EXPECT_EQ(std::string("Item 1,Item 0,Item 3,Item 2"), 364 EXPECT_EQ(std::string("Item 1,Item 0,Item 3,Item 2"),
365 GetModelContent()); 365 GetModelContent());
366 test_api_->LayoutToIdealBounds(); 366 test_api_->LayoutToIdealBounds();
367 } 367 }
368 368
369 } // namespace test 369 } // namespace test
370 } // namespace app_list 370 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | ui/app_list/contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698