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

Side by Side Diff: ash/drag_drop/drag_drop_controller_unittest.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/drag_drop/drag_drop_controller.cc ('k') | ash/drag_drop/drag_image_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 (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 "ash/drag_drop/drag_drop_controller.h" 5 #include "ash/drag_drop/drag_drop_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 EXPECT_FALSE(drag_view2->drag_done_received_); 381 EXPECT_FALSE(drag_view2->drag_done_received_);
382 } 382 }
383 383
384 TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) { 384 TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) {
385 scoped_ptr<views::Widget> widget1(CreateNewWidget()); 385 scoped_ptr<views::Widget> widget1(CreateNewWidget());
386 DragTestView* drag_view1 = new DragTestView; 386 DragTestView* drag_view1 = new DragTestView;
387 AddViewToWidgetAndResize(widget1.get(), drag_view1); 387 AddViewToWidgetAndResize(widget1.get(), drag_view1);
388 scoped_ptr<views::Widget> widget2(CreateNewWidget()); 388 scoped_ptr<views::Widget> widget2(CreateNewWidget());
389 DragTestView* drag_view2 = new DragTestView; 389 DragTestView* drag_view2 = new DragTestView;
390 AddViewToWidgetAndResize(widget2.get(), drag_view2); 390 AddViewToWidgetAndResize(widget2.get(), drag_view2);
391 gfx::Rect widget1_bounds = widget1->GetClientAreaScreenBounds(); 391 gfx::Rect widget1_bounds = widget1->GetClientAreaBoundsInScreen();
392 gfx::Rect widget2_bounds = widget2->GetClientAreaScreenBounds(); 392 gfx::Rect widget2_bounds = widget2->GetClientAreaBoundsInScreen();
393 widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0, 393 widget2->SetBounds(gfx::Rect(widget1_bounds.width(), 0,
394 widget2_bounds.width(), widget2_bounds.height())); 394 widget2_bounds.width(), widget2_bounds.height()));
395 395
396 ui::OSExchangeData data; 396 ui::OSExchangeData data;
397 data.SetString(UTF8ToUTF16("I am being dragged")); 397 data.SetString(UTF8ToUTF16("I am being dragged"));
398 398
399 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(), 399 aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow(),
400 widget1->GetNativeView()); 400 widget1->GetNativeView());
401 generator.PressLeftButton(); 401 generator.PressLeftButton();
402 402
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 EXPECT_EQ(1, drag_view->num_drag_enters_); 616 EXPECT_EQ(1, drag_view->num_drag_enters_);
617 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(), 617 EXPECT_EQ(num_drags - 1 - drag_view->VerticalDragThreshold(),
618 drag_view->num_drag_updates_); 618 drag_view->num_drag_updates_);
619 EXPECT_EQ(1, drag_view->num_drops_); 619 EXPECT_EQ(1, drag_view->num_drops_);
620 EXPECT_EQ(0, drag_view->num_drag_exits_); 620 EXPECT_EQ(0, drag_view->num_drag_exits_);
621 EXPECT_TRUE(drag_view->drag_done_received_); 621 EXPECT_TRUE(drag_view->drag_done_received_);
622 } 622 }
623 623
624 } // namespace test 624 } // namespace test
625 } // namespace aura 625 } // namespace aura
OLDNEW
« no previous file with comments | « ash/drag_drop/drag_drop_controller.cc ('k') | ash/drag_drop/drag_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698