diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 19:35:53 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-08 19:35:53 +0000 |
commit | e887c6c5ed56c7ce7268fdf853fa761baa7618b2 (patch) | |
tree | 1da30e8de0b855b513cb71fef84c539b1e2ed768 /ash/extended_desktop_unittest.cc | |
parent | f5e596ca4265d764e335b286f7e566397dd483b8 (diff) | |
download | chromium_src-e887c6c5ed56c7ce7268fdf853fa761baa7618b2.zip chromium_src-e887c6c5ed56c7ce7268fdf853fa761baa7618b2.tar.gz chromium_src-e887c6c5ed56c7ce7268fdf853fa761baa7618b2.tar.bz2 |
Keep windows in status/settings bubble in the same root window
BUG=256747
TEST=covered by test
Review URL: https://chromiumcodereview.appspot.com/18602002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/extended_desktop_unittest.cc')
-rw-r--r-- | ash/extended_desktop_unittest.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ash/extended_desktop_unittest.cc b/ash/extended_desktop_unittest.cc index f71a0b5..4115523 100644 --- a/ash/extended_desktop_unittest.cc +++ b/ash/extended_desktop_unittest.cc @@ -4,6 +4,7 @@ #include "ash/display/display_controller.h" #include "ash/display/display_manager.h" +#include "ash/root_window_controller.h" #include "ash/screen_ash.h" #include "ash/shell.h" #include "ash/shell_window_ids.h" @@ -724,6 +725,25 @@ TEST_F(ExtendedDesktopTest, StayInSameRootWindow) { w1->GetNativeView()->ClearProperty(internal::kStayInSameRootWindowKey); w1->SetBounds(gfx::Rect(10, 10, 50, 50)); EXPECT_EQ(root_windows[0], w1->GetNativeView()->GetRootWindow()); + + // a window in SettingsBubbleContainer and StatusContainer should + // not move to another root window regardles of the bounds specified. + aura::Window* settings_bubble_container = + Shell::GetPrimaryRootWindowController()->GetContainer( + kShellWindowId_SettingBubbleContainer); + aura::Window* window = aura::test::CreateTestWindowWithId( + 100, settings_bubble_container); + window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50), + ScreenAsh::GetSecondaryDisplay()); + EXPECT_EQ(root_windows[0], window->GetRootWindow()); + + aura::Window* status_container = + Shell::GetPrimaryRootWindowController()->GetContainer( + kShellWindowId_StatusContainer); + window = aura::test::CreateTestWindowWithId(100, status_container); + window->SetBoundsInScreen(gfx::Rect(150, 10, 50, 50), + ScreenAsh::GetSecondaryDisplay()); + EXPECT_EQ(root_windows[0], window->GetRootWindow()); } TEST_F(ExtendedDesktopTest, KeyEventsOnLockScreen) { |