| OLD | NEW |
| 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 "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" | 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/property_bag.h" | 10 #include "base/property_bag.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() { | 131 Browser* TabDragControllerTest::CreateAnotherWindowBrowserAndRelayout() { |
| 132 // Add another tab. | 132 // Add another tab. |
| 133 AddTabAndResetBrowser(browser()); | 133 AddTabAndResetBrowser(browser()); |
| 134 | 134 |
| 135 // Create another browser. | 135 // Create another browser. |
| 136 Browser* browser2 = CreateBrowser(browser()->profile()); | 136 Browser* browser2 = CreateBrowser(browser()->profile()); |
| 137 ResetIDs(browser2->tab_strip_model(), 100); | 137 ResetIDs(browser2->tab_strip_model(), 100); |
| 138 | 138 |
| 139 // Resize the two windows so they're right next to each other. | 139 // Resize the two windows so they're right next to each other. |
| 140 gfx::Rect work_area = gfx::Screen::GetMonitorNearestWindow( | 140 gfx::Rect work_area = gfx::Screen::GetMonitorNearestWindow( |
| 141 browser()->window()->GetNativeHandle()).work_area(); | 141 browser()->window()->GetNativeWindow()).work_area(); |
| 142 gfx::Size half_size = | 142 gfx::Size half_size = |
| 143 gfx::Size(work_area.width() / 3 - 10, work_area.height() / 2 - 10); | 143 gfx::Size(work_area.width() / 3 - 10, work_area.height() / 2 - 10); |
| 144 browser()->window()->SetBounds(gfx::Rect(work_area.origin(), half_size)); | 144 browser()->window()->SetBounds(gfx::Rect(work_area.origin(), half_size)); |
| 145 browser2->window()->SetBounds(gfx::Rect( | 145 browser2->window()->SetBounds(gfx::Rect( |
| 146 work_area.x() + half_size.width(), work_area.y(), | 146 work_area.x() + half_size.width(), work_area.y(), |
| 147 half_size.width(), half_size.height())); | 147 half_size.width(), half_size.height())); |
| 148 return browser2; | 148 return browser2; |
| 149 } | 149 } |
| 150 | 150 |
| 151 class DetachToBrowserTabDragControllerTest : public TabDragControllerTest { | 151 class DetachToBrowserTabDragControllerTest : public TabDragControllerTest { |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 | 650 |
| 651 // Release the mouse, stopping the drag session. | 651 // Release the mouse, stopping the drag session. |
| 652 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( | 652 ASSERT_TRUE(ui_test_utils::SendMouseEventsSync( |
| 653 ui_controls::LEFT, ui_controls::UP)); | 653 ui_controls::LEFT, ui_controls::UP)); |
| 654 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); | 654 ASSERT_FALSE(tab_strip2->IsDragSessionActive()); |
| 655 ASSERT_FALSE(tab_strip->IsDragSessionActive()); | 655 ASSERT_FALSE(tab_strip->IsDragSessionActive()); |
| 656 ASSERT_FALSE(TabDragController::IsActive()); | 656 ASSERT_FALSE(TabDragController::IsActive()); |
| 657 EXPECT_EQ("0 100", IDString(browser2->tab_strip_model())); | 657 EXPECT_EQ("0 100", IDString(browser2->tab_strip_model())); |
| 658 EXPECT_EQ("1", IDString(browser()->tab_strip_model())); | 658 EXPECT_EQ("1", IDString(browser()->tab_strip_model())); |
| 659 } | 659 } |
| OLD | NEW |