summaryrefslogtreecommitdiffstats
path: root/ash/wm/window_modality_controller_unittest.cc
diff options
context:
space:
mode:
authorstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 20:29:02 +0000
committerstevenjb@google.com <stevenjb@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-13 20:29:02 +0000
commit52cd32524b4be2fc4a4688bbc711adf185a89ce4 (patch)
treecb0a3214249528df0fcc8d38515c86809b158c76 /ash/wm/window_modality_controller_unittest.cc
parente52c54d6dd1f4149bcbe17a66937b8a82d9b48be (diff)
downloadchromium_src-52cd32524b4be2fc4a4688bbc711adf185a89ce4.zip
chromium_src-52cd32524b4be2fc4a4688bbc711adf185a89ce4.tar.gz
chromium_src-52cd32524b4be2fc4a4688bbc711adf185a89ce4.tar.bz2
Revert 126444 - Always look for a transient child from the activatable window.
BUG=114546 TEST=See issue. Also ensure that behavior is expected with multiple windows open, including multiple windows with modal dialogs. Review URL: http://codereview.chromium.org/9635003 TBR=stevenjb@chromium.org Review URL: https://chromiumcodereview.appspot.com/9692060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126452 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/window_modality_controller_unittest.cc')
-rw-r--r--ash/wm/window_modality_controller_unittest.cc34
1 files changed, 0 insertions, 34 deletions
diff --git a/ash/wm/window_modality_controller_unittest.cc b/ash/wm/window_modality_controller_unittest.cc
index 6666b40..666ca99 100644
--- a/ash/wm/window_modality_controller_unittest.cc
+++ b/ash/wm/window_modality_controller_unittest.cc
@@ -202,39 +202,5 @@ TEST_F(WindowModalityControllerTest, Events) {
}
}
-// Creates windows w1 and non activatiable child w11. Creates transient window
-// w2 and adds it as a transeint child of w1. Ensures that w2 is parented to
-// the parent of w1, and that GetWindowModalTransient(w11) returns w2.
-TEST_F(WindowModalityControllerTest, GetWindowModalTransient) {
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> w1(
- aura::test::CreateTestWindowWithDelegate(&d, -1, gfx::Rect(), NULL));
- scoped_ptr<aura::Window> w11(
- aura::test::CreateTestWindowWithDelegate(&d, -11, gfx::Rect(), w1.get()));
- scoped_ptr<aura::Window> w2(
- aura::test::CreateTestWindowWithDelegate(&d, -2, gfx::Rect(), NULL));
- w2->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
-
- aura::Window* wt;
- wt = WindowModalityController::GetWindowModalTransient(w1.get());
- ASSERT_EQ(static_cast<aura::Window*>(NULL), wt);
-
- // Parent w2 to w1. It should get parented to the parent of w1.
- w1->AddTransientChild(w2.get());
- ASSERT_EQ(2U, w1->parent()->children().size());
- EXPECT_EQ(-2, w1->parent()->children().at(1)->id());
-
- // Request the modal transient window for w1, it should be w2.
- wt = WindowModalityController::GetWindowModalTransient(w1.get());
- ASSERT_NE(static_cast<aura::Window*>(NULL), wt);
- EXPECT_EQ(-2, wt->id());
-
- // Request the modal transient window for w11, it should also be w2.
- wt = WindowModalityController::GetWindowModalTransient(w11.get());
- ASSERT_NE(static_cast<aura::Window*>(NULL), wt);
- EXPECT_EQ(-2, wt->id());
-}
-
-
} // namespace internal
} // namespace ash