| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ash/wm/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/public/cpp/shelf_types.h" | 7 #include "ash/public/cpp/shelf_types.h" |
| 8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
| 9 #include "ash/public/cpp/window_properties.h" | 9 #include "ash/public/cpp/window_properties.h" |
| 10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
| 11 #include "ash/shelf/shelf_layout_manager.h" | 11 #include "ash/shelf/shelf_layout_manager.h" |
| 12 #include "ash/shelf/shelf_model.h" | 12 #include "ash/shelf/shelf_model.h" |
| 13 #include "ash/shelf/shelf_widget.h" | 13 #include "ash/shelf/shelf_widget.h" |
| 14 #include "ash/shelf/wm_shelf.h" | 14 #include "ash/shelf/wm_shelf.h" |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "ash/shell_port.h" |
| 16 #include "ash/test/ash_test_base.h" | 17 #include "ash/test/ash_test_base.h" |
| 17 #include "ash/test/cursor_manager_test_api.h" | 18 #include "ash/test/cursor_manager_test_api.h" |
| 18 #include "ash/test/test_shelf_delegate.h" | 19 #include "ash/test/test_shelf_delegate.h" |
| 19 #include "ash/wm/drag_window_resizer.h" | 20 #include "ash/wm/drag_window_resizer.h" |
| 20 #include "ash/wm/window_properties.h" | 21 #include "ash/wm/window_properties.h" |
| 21 #include "ash/wm/window_state.h" | 22 #include "ash/wm/window_state.h" |
| 22 #include "ash/wm/window_state_aura.h" | 23 #include "ash/wm/window_state_aura.h" |
| 23 #include "ash/wm/wm_event.h" | 24 #include "ash/wm/wm_event.h" |
| 24 #include "ash/wm_shell.h" | |
| 25 #include "ash/wm_window.h" | 25 #include "ash/wm_window.h" |
| 26 #include "base/i18n/rtl.h" | 26 #include "base/i18n/rtl.h" |
| 27 #include "ui/aura/client/aura_constants.h" | 27 #include "ui/aura/client/aura_constants.h" |
| 28 #include "ui/aura/window_event_dispatcher.h" | 28 #include "ui/aura/window_event_dispatcher.h" |
| 29 #include "ui/base/hit_test.h" | 29 #include "ui/base/hit_test.h" |
| 30 #include "ui/base/ui_base_types.h" | 30 #include "ui/base/ui_base_types.h" |
| 31 #include "ui/views/widget/widget.h" | 31 #include "ui/views/widget/widget.h" |
| 32 #include "ui/wm/core/window_util.h" | 32 #include "ui/wm/core/window_util.h" |
| 33 | 33 |
| 34 namespace ash { | 34 namespace ash { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 ui::wm::WindowType transient_window_type_; | 218 ui::wm::WindowType transient_window_type_; |
| 219 | 219 |
| 220 private: | 220 private: |
| 221 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTransientTest); | 221 DISALLOW_COPY_AND_ASSIGN(PanelWindowResizerTransientTest); |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 // Verifies a window can be dragged from the panel and detached and then | 224 // Verifies a window can be dragged from the panel and detached and then |
| 225 // reattached. | 225 // reattached. |
| 226 TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) { | 226 TEST_F(PanelWindowResizerTest, PanelDetachReattachBottom) { |
| 227 // TODO: investigate failure. http://crbug.com/698888. | 227 // TODO: investigate failure. http://crbug.com/698888. |
| 228 if (WmShell::Get()->IsRunningInMash()) | 228 if (ShellPort::Get()->IsRunningInMash()) |
| 229 return; | 229 return; |
| 230 | 230 |
| 231 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 231 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 232 DetachReattachTest(window.get(), 0, -1); | 232 DetachReattachTest(window.get(), 0, -1); |
| 233 } | 233 } |
| 234 | 234 |
| 235 TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) { | 235 TEST_F(PanelWindowResizerTest, PanelDetachReattachLeft) { |
| 236 // TODO: investigate failure. http://crbug.com/698888. | 236 // TODO: investigate failure. http://crbug.com/698888. |
| 237 if (WmShell::Get()->IsRunningInMash()) | 237 if (ShellPort::Get()->IsRunningInMash()) |
| 238 return; | 238 return; |
| 239 | 239 |
| 240 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); | 240 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); |
| 241 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 241 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 242 DetachReattachTest(window.get(), 1, 0); | 242 DetachReattachTest(window.get(), 1, 0); |
| 243 } | 243 } |
| 244 | 244 |
| 245 TEST_F(PanelWindowResizerTest, PanelDetachReattachRight) { | 245 TEST_F(PanelWindowResizerTest, PanelDetachReattachRight) { |
| 246 // TODO: investigate failure. http://crbug.com/698888. | 246 // TODO: investigate failure. http://crbug.com/698888. |
| 247 if (WmShell::Get()->IsRunningInMash()) | 247 if (ShellPort::Get()->IsRunningInMash()) |
| 248 return; | 248 return; |
| 249 | 249 |
| 250 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_RIGHT); | 250 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_RIGHT); |
| 251 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 251 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 252 DetachReattachTest(window.get(), -1, 0); | 252 DetachReattachTest(window.get(), -1, 0); |
| 253 } | 253 } |
| 254 | 254 |
| 255 // Tests that a drag continues when the shelf is hidden. This occurs as part of | 255 // Tests that a drag continues when the shelf is hidden. This occurs as part of |
| 256 // the animation when switching profiles. http://crbug.com/393047. | 256 // the animation when switching profiles. http://crbug.com/393047. |
| 257 TEST_F(PanelWindowResizerTest, DetachThenHideShelf) { | 257 TEST_F(PanelWindowResizerTest, DetachThenHideShelf) { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 275 | 275 |
| 276 // When the drag ends the window should be detached and placed where it was | 276 // When the drag ends the window should be detached and placed where it was |
| 277 // dragged to. | 277 // dragged to. |
| 278 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); | 278 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); |
| 279 EXPECT_FALSE(state->IsMinimized()); | 279 EXPECT_FALSE(state->IsMinimized()); |
| 280 EXPECT_EQ(expected_bounds.ToString(), window->GetBoundsInScreen().ToString()); | 280 EXPECT_EQ(expected_bounds.ToString(), window->GetBoundsInScreen().ToString()); |
| 281 } | 281 } |
| 282 | 282 |
| 283 TEST_F(PanelWindowResizerTest, PanelDetachReattachMultipleDisplays) { | 283 TEST_F(PanelWindowResizerTest, PanelDetachReattachMultipleDisplays) { |
| 284 // TODO: investigate failure. http://crbug.com/698888. | 284 // TODO: investigate failure. http://crbug.com/698888. |
| 285 if (WmShell::Get()->IsRunningInMash()) | 285 if (ShellPort::Get()->IsRunningInMash()) |
| 286 return; | 286 return; |
| 287 | 287 |
| 288 UpdateDisplay("600x400,600x400"); | 288 UpdateDisplay("600x400,600x400"); |
| 289 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 289 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 290 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(600, 0))); | 290 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(600, 0))); |
| 291 EXPECT_EQ(root_windows[1], window->GetRootWindow()); | 291 EXPECT_EQ(root_windows[1], window->GetRootWindow()); |
| 292 DetachReattachTest(window.get(), 0, -1); | 292 DetachReattachTest(window.get(), 0, -1); |
| 293 } | 293 } |
| 294 | 294 |
| 295 TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) { | 295 TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) { |
| 296 // TODO: investigate failure. http://crbug.com/698888. | 296 // TODO: investigate failure. http://crbug.com/698888. |
| 297 if (WmShell::Get()->IsRunningInMash()) | 297 if (ShellPort::Get()->IsRunningInMash()) |
| 298 return; | 298 return; |
| 299 | 299 |
| 300 UpdateDisplay("600x400,600x400"); | 300 UpdateDisplay("600x400,600x400"); |
| 301 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 301 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 302 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 302 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 303 gfx::Rect initial_bounds = window->GetBoundsInScreen(); | 303 gfx::Rect initial_bounds = window->GetBoundsInScreen(); |
| 304 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 304 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
| 305 DragStart(window.get()); | 305 DragStart(window.get()); |
| 306 DragMove(0, -100); | 306 DragMove(0, -100); |
| 307 DragEnd(); | 307 DragEnd(); |
| 308 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 308 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
| 309 EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x()); | 309 EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x()); |
| 310 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); | 310 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); |
| 311 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); | 311 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); |
| 312 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); | 312 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); |
| 313 | 313 |
| 314 DragStart(window.get()); | 314 DragStart(window.get()); |
| 315 DragMove(500, 0); | 315 DragMove(500, 0); |
| 316 DragEnd(); | 316 DragEnd(); |
| 317 EXPECT_EQ(root_windows[1], window->GetRootWindow()); | 317 EXPECT_EQ(root_windows[1], window->GetRootWindow()); |
| 318 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); | 318 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); |
| 319 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); | 319 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); |
| 320 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); | 320 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); |
| 321 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); | 321 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); |
| 322 } | 322 } |
| 323 | 323 |
| 324 TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) { | 324 TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) { |
| 325 // TODO: investigate failure. http://crbug.com/698888. | 325 // TODO: investigate failure. http://crbug.com/698888. |
| 326 if (WmShell::Get()->IsRunningInMash()) | 326 if (ShellPort::Get()->IsRunningInMash()) |
| 327 return; | 327 return; |
| 328 | 328 |
| 329 UpdateDisplay("600x400,600x400"); | 329 UpdateDisplay("600x400,600x400"); |
| 330 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 330 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 331 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 331 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 332 gfx::Rect initial_bounds = window->GetBoundsInScreen(); | 332 gfx::Rect initial_bounds = window->GetBoundsInScreen(); |
| 333 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 333 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
| 334 DragStart(window.get()); | 334 DragStart(window.get()); |
| 335 DragMove(500, -100); | 335 DragMove(500, -100); |
| 336 DragEnd(); | 336 DragEnd(); |
| 337 EXPECT_EQ(root_windows[1], window->GetRootWindow()); | 337 EXPECT_EQ(root_windows[1], window->GetRootWindow()); |
| 338 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); | 338 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); |
| 339 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); | 339 EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y()); |
| 340 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); | 340 EXPECT_FALSE(window->GetProperty(kPanelAttachedKey)); |
| 341 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); | 341 EXPECT_EQ(kShellWindowId_DefaultContainer, window->parent()->id()); |
| 342 } | 342 } |
| 343 | 343 |
| 344 TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) { | 344 TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) { |
| 345 // TODO: investigate failure. http://crbug.com/698888. | 345 // TODO: investigate failure. http://crbug.com/698888. |
| 346 if (WmShell::Get()->IsRunningInMash()) | 346 if (ShellPort::Get()->IsRunningInMash()) |
| 347 return; | 347 return; |
| 348 | 348 |
| 349 UpdateDisplay("600x400,600x600"); | 349 UpdateDisplay("600x400,600x600"); |
| 350 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 350 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 351 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 351 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 352 gfx::Rect initial_bounds = window->GetBoundsInScreen(); | 352 gfx::Rect initial_bounds = window->GetBoundsInScreen(); |
| 353 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 353 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
| 354 | 354 |
| 355 // Detach the window. | 355 // Detach the window. |
| 356 DragStart(window.get()); | 356 DragStart(window.get()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 369 DragEnd(); | 369 DragEnd(); |
| 370 | 370 |
| 371 // When dropped should move to second display's panel container. | 371 // When dropped should move to second display's panel container. |
| 372 EXPECT_EQ(root_windows[1], window->GetRootWindow()); | 372 EXPECT_EQ(root_windows[1], window->GetRootWindow()); |
| 373 EXPECT_TRUE(window->GetProperty(kPanelAttachedKey)); | 373 EXPECT_TRUE(window->GetProperty(kPanelAttachedKey)); |
| 374 EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); | 374 EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); |
| 375 } | 375 } |
| 376 | 376 |
| 377 TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) { | 377 TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) { |
| 378 // TODO: investigate failure. http://crbug.com/698888. | 378 // TODO: investigate failure. http://crbug.com/698888. |
| 379 if (WmShell::Get()->IsRunningInMash()) | 379 if (ShellPort::Get()->IsRunningInMash()) |
| 380 return; | 380 return; |
| 381 | 381 |
| 382 UpdateDisplay("600x400,600x600"); | 382 UpdateDisplay("600x400,600x600"); |
| 383 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 383 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 384 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 384 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 385 gfx::Rect initial_bounds = window->GetBoundsInScreen(); | 385 gfx::Rect initial_bounds = window->GetBoundsInScreen(); |
| 386 EXPECT_EQ(root_windows[0], window->GetRootWindow()); | 386 EXPECT_EQ(root_windows[0], window->GetRootWindow()); |
| 387 | 387 |
| 388 // Drag the window just above the other display's launcher. | 388 // Drag the window just above the other display's launcher. |
| 389 DragStart(window.get()); | 389 DragStart(window.get()); |
| 390 DragMove(500, 195); | 390 DragMove(500, 195); |
| 391 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); | 391 EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x()); |
| 392 | 392 |
| 393 // Should stick to other launcher. | 393 // Should stick to other launcher. |
| 394 EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y()); | 394 EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y()); |
| 395 DragEnd(); | 395 DragEnd(); |
| 396 | 396 |
| 397 // When dropped should move to second display's panel container. | 397 // When dropped should move to second display's panel container. |
| 398 EXPECT_EQ(root_windows[1], window->GetRootWindow()); | 398 EXPECT_EQ(root_windows[1], window->GetRootWindow()); |
| 399 EXPECT_TRUE(window->GetProperty(kPanelAttachedKey)); | 399 EXPECT_TRUE(window->GetProperty(kPanelAttachedKey)); |
| 400 EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); | 400 EXPECT_EQ(kShellWindowId_PanelContainer, window->parent()->id()); |
| 401 } | 401 } |
| 402 | 402 |
| 403 TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) { | 403 TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) { |
| 404 // TODO: investigate failure. http://crbug.com/698888. | 404 // TODO: investigate failure. http://crbug.com/698888. |
| 405 if (WmShell::Get()->IsRunningInMash()) | 405 if (ShellPort::Get()->IsRunningInMash()) |
| 406 return; | 406 return; |
| 407 | 407 |
| 408 UpdateDisplay("600x400,600x600"); | 408 UpdateDisplay("600x400,600x600"); |
| 409 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 409 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
| 410 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 410 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 411 std::unique_ptr<aura::Window> fullscreen( | 411 std::unique_ptr<aura::Window> fullscreen( |
| 412 CreateTestWindowInShellWithBounds(gfx::Rect(600, 0, 101, 101))); | 412 CreateTestWindowInShellWithBounds(gfx::Rect(600, 0, 101, 101))); |
| 413 wm::GetWindowState(fullscreen.get())->Activate(); | 413 wm::GetWindowState(fullscreen.get())->Activate(); |
| 414 const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN); | 414 const wm::WMEvent event(wm::WM_EVENT_TOGGLE_FULLSCREEN); |
| 415 wm::GetWindowState(fullscreen.get())->OnWMEvent(&event); | 415 wm::GetWindowState(fullscreen.get())->OnWMEvent(&event); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 | 485 |
| 486 TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { | 486 TEST_F(PanelWindowResizerTest, DragReordersPanelsVertical) { |
| 487 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); | 487 GetPrimaryShelf()->SetAlignment(SHELF_ALIGNMENT_LEFT); |
| 488 DragAlongShelfReorder(0, -1); | 488 DragAlongShelfReorder(0, -1); |
| 489 } | 489 } |
| 490 | 490 |
| 491 // Tests that panels can have transient children of different types. | 491 // Tests that panels can have transient children of different types. |
| 492 // The transient children should be reparented in sync with the panel. | 492 // The transient children should be reparented in sync with the panel. |
| 493 TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { | 493 TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { |
| 494 // TODO: investigate failure. http://crbug.com/698888. | 494 // TODO: investigate failure. http://crbug.com/698888. |
| 495 if (WmShell::Get()->IsRunningInMash()) | 495 if (ShellPort::Get()->IsRunningInMash()) |
| 496 return; | 496 return; |
| 497 | 497 |
| 498 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); | 498 std::unique_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); |
| 499 std::unique_ptr<aura::Window> child( | 499 std::unique_ptr<aura::Window> child( |
| 500 CreateTestWindowInShellWithDelegateAndType( | 500 CreateTestWindowInShellWithDelegateAndType( |
| 501 NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40))); | 501 NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40))); |
| 502 ::wm::AddTransientChild(window.get(), child.get()); | 502 ::wm::AddTransientChild(window.get(), child.get()); |
| 503 if (window->parent() != child->parent()) | 503 if (window->parent() != child->parent()) |
| 504 window->parent()->AddChild(child.get()); | 504 window->parent()->AddChild(child.get()); |
| 505 EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); | 505 EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get())); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 555 INSTANTIATE_TEST_CASE_P(LtrRtl, | 555 INSTANTIATE_TEST_CASE_P(LtrRtl, |
| 556 PanelWindowResizerTextDirectionTest, | 556 PanelWindowResizerTextDirectionTest, |
| 557 testing::Bool()); | 557 testing::Bool()); |
| 558 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, | 558 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, |
| 559 PanelWindowResizerTransientTest, | 559 PanelWindowResizerTransientTest, |
| 560 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, | 560 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, |
| 561 ui::wm::WINDOW_TYPE_PANEL, | 561 ui::wm::WINDOW_TYPE_PANEL, |
| 562 ui::wm::WINDOW_TYPE_POPUP)); | 562 ui::wm::WINDOW_TYPE_POPUP)); |
| 563 | 563 |
| 564 } // namespace ash | 564 } // namespace ash |
| OLD | NEW |