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

Side by Side Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 196063002: Move wm/core to wm namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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/wm/panels/panel_layout_manager.cc ('k') | ash/wm/resize_shadow.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) 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/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shelf/shelf.h" 8 #include "ash/shelf/shelf.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_model.h" 10 #include "ash/shelf/shelf_model.h"
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 501
502 // Tests that panels can have transient children of different types. 502 // Tests that panels can have transient children of different types.
503 // The transient children should be reparented in sync with the panel. 503 // The transient children should be reparented in sync with the panel.
504 TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) { 504 TEST_P(PanelWindowResizerTransientTest, PanelWithTransientChild) {
505 if (!SupportsHostWindowResize()) 505 if (!SupportsHostWindowResize())
506 return; 506 return;
507 507
508 scoped_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0))); 508 scoped_ptr<aura::Window> window(CreatePanelWindow(gfx::Point(0, 0)));
509 scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType( 509 scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType(
510 NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40))); 510 NULL, transient_window_type_, 0, gfx::Rect(20, 20, 150, 40)));
511 views::corewm::AddTransientChild(window.get(), child.get()); 511 ::wm::AddTransientChild(window.get(), child.get());
512 if (window->parent() != child->parent()) 512 if (window->parent() != child->parent())
513 window->parent()->AddChild(child.get()); 513 window->parent()->AddChild(child.get());
514 EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get())); 514 EXPECT_EQ(window.get(), ::wm::GetTransientParent(child.get()));
515 515
516 // Drag the child to the shelf. Its new position should not be overridden. 516 // Drag the child to the shelf. Its new position should not be overridden.
517 const gfx::Rect attached_bounds(window->GetBoundsInScreen()); 517 const gfx::Rect attached_bounds(window->GetBoundsInScreen());
518 const int dy = window->GetBoundsInScreen().bottom() - 518 const int dy = window->GetBoundsInScreen().bottom() -
519 child->GetBoundsInScreen().bottom(); 519 child->GetBoundsInScreen().bottom();
520 DragStart(child.get()); 520 DragStart(child.get());
521 DragMove(50, dy); 521 DragMove(50, dy);
522 // While moving the transient child window should be in the panel container. 522 // While moving the transient child window should be in the panel container.
523 EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id()); 523 EXPECT_EQ(internal::kShellWindowId_PanelContainer, child->parent()->id());
524 DragEnd(); 524 DragEnd();
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, 564 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest,
565 testing::Bool()); 565 testing::Bool());
566 INSTANTIATE_TEST_CASE_P(NormalPanelPopup, 566 INSTANTIATE_TEST_CASE_P(NormalPanelPopup,
567 PanelWindowResizerTransientTest, 567 PanelWindowResizerTransientTest,
568 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 568 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
569 ui::wm::WINDOW_TYPE_PANEL, 569 ui::wm::WINDOW_TYPE_PANEL,
570 ui::wm::WINDOW_TYPE_POPUP)); 570 ui::wm::WINDOW_TYPE_POPUP));
571 571
572 } // namespace internal 572 } // namespace internal
573 } // namespace ash 573 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/resize_shadow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698