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

Side by Side Diff: ash/wm/workspace/workspace_window_resizer_unittest.cc

Issue 11428066: Use WS_POPUP for ash_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/test/display_manager_test_api.cc ('k') | ui/aura/root_window.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 "ash/wm/workspace/workspace_window_resizer.h" 5 #include "ash/wm/workspace/workspace_window_resizer.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/mouse_cursor_event_filter.h" 8 #include "ash/display/mouse_cursor_event_filter.h"
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/screen_ash.h" 10 #include "ash/screen_ash.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 scoped_ptr<aura::Window> window2_; 156 scoped_ptr<aura::Window> window2_;
157 scoped_ptr<aura::Window> window3_; 157 scoped_ptr<aura::Window> window3_;
158 scoped_ptr<aura::Window> window4_; 158 scoped_ptr<aura::Window> window4_;
159 159
160 private: 160 private:
161 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest); 161 DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest);
162 }; 162 };
163 163
164 } // namespace 164 } // namespace
165 165
166 // Fails on win_aura since ash::GetRootWindowRelativeToWindow is not implemented
167 // yet for the platform.
168 #if defined(OS_WIN)
169 #define MAYBE_WindowDragWithMultiDisplays \
170 DISABLED_WindowDragWithMultiDisplays
171 #define MAYBE_WindowDragWithMultiDisplaysRightToLeft \
172 DISABLED_WindowDragWithMultiDisplaysRightToLeft
173 #define MAYBE_PhantomStyle DISABLED_PhantomStyle
174 #define MAYBE_CancelSnapPhantom DISABLED_CancelSnapPhantom
175 #define MAYBE_CursorDeviceScaleFactor DISABLED_CursorDeviceScaleFactor
176 #else
177 #define MAYBE_WindowDragWithMultiDisplays WindowDragWithMultiDisplays
178 #define MAYBE_WindowDragWithMultiDisplaysRightToLeft \
179 WindowDragWithMultiDisplaysRightToLeft
180 #define MAYBE_PhantomStyle PhantomStyle
181 #define MAYBE_CancelSnapPhantom CancelSnapPhantom
182 #define MAYBE_CursorDeviceScaleFactor CursorDeviceScaleFactor
183 #endif
184
185 // Assertions around attached window resize dragging from the right with 2 166 // Assertions around attached window resize dragging from the right with 2
186 // windows. 167 // windows.
187 TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) { 168 TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) {
188 window_->SetBounds(gfx::Rect(0, 300, 400, 300)); 169 window_->SetBounds(gfx::Rect(0, 300, 400, 300));
189 window2_->SetBounds(gfx::Rect(400, 200, 100, 200)); 170 window2_->SetBounds(gfx::Rect(400, 200, 100, 200));
190 171
191 std::vector<aura::Window*> windows; 172 std::vector<aura::Window*> windows;
192 windows.push_back(window2_.get()); 173 windows.push_back(window2_.get());
193 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 174 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
194 window_.get(), gfx::Point(), HTRIGHT, windows)); 175 window_.get(), gfx::Point(), HTRIGHT, windows));
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 364
384 // Revert and make sure everything moves back. 365 // Revert and make sure everything moves back.
385 resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0); 366 resizer->Drag(CalculateDragPoint(*resizer, 800, 20), 0);
386 resizer->RevertDrag(); 367 resizer->RevertDrag();
387 EXPECT_EQ("0,50 400x200", window_->bounds().ToString()); 368 EXPECT_EQ("0,50 400x200", window_->bounds().ToString());
388 EXPECT_EQ("0,250 200x100", window2_->bounds().ToString()); 369 EXPECT_EQ("0,250 200x100", window2_->bounds().ToString());
389 } 370 }
390 371
391 // Assertions around attached window resize dragging from the bottom with 3 372 // Assertions around attached window resize dragging from the bottom with 3
392 // windows. 373 // windows.
393 // TODO(oshima): Host window doesn't get a resize event after 374 TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) {
394 // SetHostSize on Windows trybot, which gives wrong work/display area.
395 // crbug.com/141577.
396 #if defined(OS_WIN)
397 #define MAYBE_AttachedResize_BOTTOM_3 DISABLED_AttachedResize_BOTTOM_3
398 #else
399 #define MAYBE_AttachedResize_BOTTOM_3 AttachedResize_BOTTOM_3
400 #endif
401 TEST_F(WorkspaceWindowResizerTest, MAYBE_AttachedResize_BOTTOM_3) {
402 aura::RootWindow* root = Shell::GetPrimaryRootWindow(); 375 aura::RootWindow* root = Shell::GetPrimaryRootWindow();
403 root->SetHostSize(gfx::Size(600, 800)); 376 root->SetHostSize(gfx::Size(600, 800));
404 377
405 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); 378 Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
406 379
407 window_->SetBounds(gfx::Rect( 300, 100, 300, 200)); 380 window_->SetBounds(gfx::Rect( 300, 100, 300, 200));
408 window2_->SetBounds(gfx::Rect(300, 300, 200, 150)); 381 window2_->SetBounds(gfx::Rect(300, 300, 200, 150));
409 window3_->SetBounds(gfx::Rect(300, 450, 200, 100)); 382 window3_->SetBounds(gfx::Rect(300, 450, 200, 100));
410 delegate2_.set_min_size(gfx::Size(50, 52)); 383 delegate2_.set_min_size(gfx::Size(50, 52));
411 delegate3_.set_min_size(gfx::Size(50, 38)); 384 delegate3_.set_min_size(gfx::Size(50, 38));
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 ASSERT_TRUE(resizer.get()); 472 ASSERT_TRUE(resizer.get());
500 resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0); 473 resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
501 resizer->CompleteDrag(0); 474 resizer->CompleteDrag(0);
502 EXPECT_EQ("80,0 720x" + base::IntToString(bottom), 475 EXPECT_EQ("80,0 720x" + base::IntToString(bottom),
503 window_->bounds().ToString()); 476 window_->bounds().ToString());
504 ASSERT_TRUE(GetRestoreBoundsInScreen(window_.get())); 477 ASSERT_TRUE(GetRestoreBoundsInScreen(window_.get()));
505 EXPECT_EQ("20,30 50x60", 478 EXPECT_EQ("20,30 50x60",
506 GetRestoreBoundsInScreen(window_.get())->ToString()); 479 GetRestoreBoundsInScreen(window_.get())->ToString());
507 } 480 }
508 481
509 #if !defined(OS_WIN)
510 // Test if the restore bounds is correct in multiple displays. 482 // Test if the restore bounds is correct in multiple displays.
511 ClearRestoreBounds(window_.get()); 483 ClearRestoreBounds(window_.get());
512 UpdateDisplay("800x600,200x600"); 484 UpdateDisplay("800x600,200x600");
513 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 485 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
514 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 486 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
515 window_->SetBoundsInScreen(gfx::Rect(800, 10, 50, 60), 487 window_->SetBoundsInScreen(gfx::Rect(800, 10, 50, 60),
516 ScreenAsh::GetSecondaryDisplay()); 488 ScreenAsh::GetSecondaryDisplay());
517 EXPECT_EQ(root_windows[1], window_->GetRootWindow()); 489 EXPECT_EQ(root_windows[1], window_->GetRootWindow());
518 { 490 {
519 bottom = 491 bottom =
520 ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom(); 492 ScreenAsh::GetDisplayWorkAreaBoundsInParent(window_.get()).bottom();
521 EXPECT_EQ("800,10 50x60", window_->GetBoundsInScreen().ToString()); 493 EXPECT_EQ("800,10 50x60", window_->GetBoundsInScreen().ToString());
522 494
523 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 495 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
524 window_.get(), gfx::Point(), HTCAPTION, empty_windows())); 496 window_.get(), gfx::Point(), HTCAPTION, empty_windows()));
525 ASSERT_TRUE(resizer.get()); 497 ASSERT_TRUE(resizer.get());
526 498
527 resizer->Drag(CalculateDragPoint(*resizer, 199, 00), 0); 499 resizer->Drag(CalculateDragPoint(*resizer, 199, 00), 0);
528 resizer->CompleteDrag(0); 500 resizer->CompleteDrag(0);
529 // With the resolution of 200x600 we will hit in this case the 50% screen 501 // With the resolution of 200x600 we will hit in this case the 50% screen
530 // size setting. 502 // size setting.
531 EXPECT_EQ("100,0 100x" + base::IntToString(bottom), 503 EXPECT_EQ("100,0 100x" + base::IntToString(bottom),
532 window_->bounds().ToString()); 504 window_->bounds().ToString());
533 EXPECT_EQ("800,10 50x60", 505 EXPECT_EQ("800,10 50x60",
534 GetRestoreBoundsInScreen(window_.get())->ToString()); 506 GetRestoreBoundsInScreen(window_.get())->ToString());
535 } 507 }
536 #endif
537 } 508 }
538 509
539 // Check that non resizable windows will not get resized. 510 // Check that non resizable windows will not get resized.
540 TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) { 511 TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) {
541 window_->SetBounds(gfx::Rect(20, 30, 50, 60)); 512 window_->SetBounds(gfx::Rect(20, 30, 50, 60));
542 window_->SetProperty(aura::client::kCanResizeKey, false); 513 window_->SetProperty(aura::client::kCanResizeKey, false);
543 514
544 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 515 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
545 window_.get(), gfx::Point(), HTCAPTION, empty_windows())); 516 window_.get(), gfx::Point(), HTCAPTION, empty_windows()));
546 ASSERT_TRUE(resizer.get()); 517 ASSERT_TRUE(resizer.get());
547 resizer->Drag(CalculateDragPoint(*resizer, -20, 0), 0); 518 resizer->Drag(CalculateDragPoint(*resizer, -20, 0), 0);
548 resizer->CompleteDrag(0); 519 resizer->CompleteDrag(0);
549 EXPECT_EQ("0,30 50x60", window_->bounds().ToString()); 520 EXPECT_EQ("0,30 50x60", window_->bounds().ToString());
550 } 521 }
551 522
552 // Verifies a window can be moved from the primary display to another. 523 // Verifies a window can be moved from the primary display to another.
553 TEST_F(WorkspaceWindowResizerTest, MAYBE_WindowDragWithMultiDisplays) { 524 TEST_F(WorkspaceWindowResizerTest, WindowDragWithMultiDisplays) {
554 // The secondary display is logically on the right, but on the system (e.g. X) 525 // The secondary display is logically on the right, but on the system (e.g. X)
555 // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc. 526 // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
556 UpdateDisplay("800x600,800x600"); 527 UpdateDisplay("800x600,800x600");
557 shelf_layout_manager()->LayoutShelf(); 528 shelf_layout_manager()->LayoutShelf();
558 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 529 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
559 ASSERT_EQ(2U, root_windows.size()); 530 ASSERT_EQ(2U, root_windows.size());
560 531
561 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), 532 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
562 Shell::GetScreen()->GetPrimaryDisplay()); 533 Shell::GetScreen()->GetPrimaryDisplay());
563 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 534 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 // Since the pointer is on the secondary, the parent should be changed 577 // Since the pointer is on the secondary, the parent should be changed
607 // even though only small fraction of the window is within the secondary 578 // even though only small fraction of the window is within the secondary
608 // root window's bounds. 579 // root window's bounds.
609 EXPECT_EQ(root_windows[1], window_->GetRootWindow()); 580 EXPECT_EQ(root_windows[1], window_->GetRootWindow());
610 EXPECT_EQ("-49,10 50x60", window_->bounds().ToString()); 581 EXPECT_EQ("-49,10 50x60", window_->bounds().ToString());
611 } 582 }
612 } 583 }
613 584
614 // Verifies a window can be moved from the secondary display to primary. 585 // Verifies a window can be moved from the secondary display to primary.
615 TEST_F(WorkspaceWindowResizerTest, 586 TEST_F(WorkspaceWindowResizerTest,
616 MAYBE_WindowDragWithMultiDisplaysRightToLeft) { 587 WindowDragWithMultiDisplaysRightToLeft) {
617 UpdateDisplay("800x600,800x600"); 588 UpdateDisplay("800x600,800x600");
618 shelf_layout_manager()->LayoutShelf(); 589 shelf_layout_manager()->LayoutShelf();
619 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 590 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
620 ASSERT_EQ(2U, root_windows.size()); 591 ASSERT_EQ(2U, root_windows.size());
621 592
622 window_->SetBoundsInScreen( 593 window_->SetBoundsInScreen(
623 gfx::Rect(800, 00, 50, 60), 594 gfx::Rect(800, 00, 50, 60),
624 Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1])); 595 Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
625 EXPECT_EQ(root_windows[1], window_->GetRootWindow()); 596 EXPECT_EQ(root_windows[1], window_->GetRootWindow());
626 { 597 {
627 // Grab (0, 0) of the window. 598 // Grab (0, 0) of the window.
628 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 599 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
629 window_.get(), gfx::Point(), HTCAPTION, empty_windows())); 600 window_.get(), gfx::Point(), HTCAPTION, empty_windows()));
630 ASSERT_TRUE(resizer.get()); 601 ASSERT_TRUE(resizer.get());
631 // Move the mouse near the right edge, (798, 0), of the primary display. 602 // Move the mouse near the right edge, (798, 0), of the primary display.
632 resizer->Drag(CalculateDragPoint(*resizer, -2, 0), ui::EF_CONTROL_DOWN); 603 resizer->Drag(CalculateDragPoint(*resizer, -2, 0), ui::EF_CONTROL_DOWN);
633 resizer->CompleteDrag(0); 604 resizer->CompleteDrag(0);
634 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 605 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
635 EXPECT_EQ("798,0 50x60", window_->bounds().ToString()); 606 EXPECT_EQ("798,0 50x60", window_->bounds().ToString());
636 } 607 }
637 } 608 }
638 609
639 // Verifies the style of the drag phantom window is correct. 610 // Verifies the style of the drag phantom window is correct.
640 TEST_F(WorkspaceWindowResizerTest, MAYBE_PhantomStyle) { 611 TEST_F(WorkspaceWindowResizerTest, PhantomStyle) {
641 UpdateDisplay("800x600,800x600"); 612 UpdateDisplay("800x600,800x600");
642 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 613 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
643 ASSERT_EQ(2U, root_windows.size()); 614 ASSERT_EQ(2U, root_windows.size());
644 615
645 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), 616 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
646 Shell::GetScreen()->GetPrimaryDisplay()); 617 Shell::GetScreen()->GetPrimaryDisplay());
647 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 618 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
648 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); 619 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
649 { 620 {
650 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 621 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 EXPECT_FALSE(resizer->drag_phantom_window_controller_.get()); 676 EXPECT_FALSE(resizer->drag_phantom_window_controller_.get());
706 677
707 resizer->Drag(CalculateDragPoint(*resizer, 0, 610), 0); 678 resizer->Drag(CalculateDragPoint(*resizer, 0, 610), 0);
708 resizer->RevertDrag(); 679 resizer->RevertDrag();
709 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 680 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
710 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); 681 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
711 } 682 }
712 } 683 }
713 684
714 // Verifies the style of the drag phantom window is correct. 685 // Verifies the style of the drag phantom window is correct.
715 TEST_F(WorkspaceWindowResizerTest, MAYBE_CancelSnapPhantom) { 686 TEST_F(WorkspaceWindowResizerTest, CancelSnapPhantom) {
716 UpdateDisplay("800x600,800x600"); 687 UpdateDisplay("800x600,800x600");
717 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 688 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
718 ASSERT_EQ(2U, root_windows.size()); 689 ASSERT_EQ(2U, root_windows.size());
719 690
720 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60), 691 window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
721 Shell::GetScreen()->GetPrimaryDisplay()); 692 Shell::GetScreen()->GetPrimaryDisplay());
722 EXPECT_EQ(root_windows[0], window_->GetRootWindow()); 693 EXPECT_EQ(root_windows[0], window_->GetRootWindow());
723 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity()); 694 EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
724 { 695 {
725 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 696 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1393 1364
1394 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create( 1365 scoped_ptr<WorkspaceWindowResizer> resizer(WorkspaceWindowResizer::Create(
1395 window_.get(), gfx::Point(), HTLEFT, empty_windows())); 1366 window_.get(), gfx::Point(), HTLEFT, empty_windows()));
1396 ASSERT_TRUE(resizer.get()); 1367 ASSERT_TRUE(resizer.get());
1397 resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0); 1368 resizer->Drag(CalculateDragPoint(*resizer, 0, 0), 0);
1398 EXPECT_EQ("99,200 21x30", window_->bounds().ToString()); 1369 EXPECT_EQ("99,200 21x30", window_->bounds().ToString());
1399 } 1370 }
1400 1371
1401 // Verifies cursor's device scale factor is updated whe a window is moved across 1372 // Verifies cursor's device scale factor is updated whe a window is moved across
1402 // root windows with different device scale factors (http://crbug.com/154183). 1373 // root windows with different device scale factors (http://crbug.com/154183).
1403 TEST_F(WorkspaceWindowResizerTest, MAYBE_CursorDeviceScaleFactor) { 1374 TEST_F(WorkspaceWindowResizerTest, CursorDeviceScaleFactor) {
1404 // The secondary display is logically on the right, but on the system (e.g. X) 1375 // The secondary display is logically on the right, but on the system (e.g. X)
1405 // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc. 1376 // layer, it's below the primary one. See UpdateDisplay() in ash_test_base.cc.
1406 UpdateDisplay("400x400,800x800*2"); 1377 UpdateDisplay("400x400,800x800*2");
1407 shelf_layout_manager()->LayoutShelf(); 1378 shelf_layout_manager()->LayoutShelf();
1408 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 1379 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
1409 ASSERT_EQ(2U, root_windows.size()); 1380 ASSERT_EQ(2U, root_windows.size());
1410 1381
1411 test::CursorManagerTestApi cursor_test_api( 1382 test::CursorManagerTestApi cursor_test_api(
1412 Shell::GetInstance()->cursor_manager()); 1383 Shell::GetInstance()->cursor_manager());
1413 MouseCursorEventFilter* event_filter = 1384 MouseCursorEventFilter* event_filter =
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 ASSERT_TRUE(resizer.get()); 1722 ASSERT_TRUE(resizer.get());
1752 // Move it 50 to the left, which should contract w1 and expand w2-3. 1723 // Move it 50 to the left, which should contract w1 and expand w2-3.
1753 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0); 1724 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0);
1754 EXPECT_EQ("100,100 98x100", window_->bounds().ToString()); 1725 EXPECT_EQ("100,100 98x100", window_->bounds().ToString());
1755 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString()); 1726 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString());
1756 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); 1727 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString());
1757 } 1728 }
1758 1729
1759 } // namespace internal 1730 } // namespace internal
1760 } // namespace ash 1731 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/display_manager_test_api.cc ('k') | ui/aura/root_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698