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

Unified Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MRUWindowTracker and MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest Created 7 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 side-by-side diff with in-line comments
Download patch
Index: ash/wm/dock/docked_window_resizer_unittest.cc
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 9bfe7217f961a7f3d066b8389a7f51504cb7d4c5..c11b07b843a09d6b476de3061471211c2bb6845e 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -32,6 +32,7 @@
#include "ui/aura/test/test_window_delegate.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
+#include "ui/views/corewm/transient_window_manager.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -1297,10 +1298,10 @@ TEST_P(DockedWindowResizerTest, DragWindowWithTransientChild) {
scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
scoped_ptr<aura::Window> child(CreateTestWindowInShellWithDelegateAndType(
NULL, aura::client::WINDOW_TYPE_NORMAL, 0, gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
+ views::corewm::AddTransientChild(window.get(), child.get());
if (window->parent() != child->parent())
window->parent()->AddChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, window.get(), 20);
@@ -1347,8 +1348,8 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) {
// While still dragging create a modal window and make it a transient child of
// the |window|.
scoped_ptr<aura::Window> child(CreateModalWindow(gfx::Rect(20, 20, 150, 20)));
- window->AddTransientChild(child.get());
- EXPECT_EQ(window.get(), child->transient_parent());
+ views::corewm::AddTransientChild(window.get(), child.get());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
EXPECT_EQ(internal::kShellWindowId_SystemModalContainer,
child->parent()->id());
@@ -1368,7 +1369,7 @@ TEST_P(DockedWindowResizerTest, DragWindowWithModalTransientChild) {
EXPECT_EQ(gfx::Point(20, 20).ToString(),
child->GetBoundsInScreen().origin().ToString());
// The |child| should still be a transient child of |window|.
- EXPECT_EQ(window.get(), child->transient_parent());
+ EXPECT_EQ(window.get(), views::corewm::GetTransientParent(child.get()));
}
// Tests that side snapping a window undocks it, closes the dock and then snaps.

Powered by Google App Engine
This is Rietveld 408576698