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

Unified Diff: ash/wm/panels/panel_window_resizer_unittest.cc

Issue 149493008: Use active window if on current workspace for fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panels/panel_window_resizer_unittest.cc
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 213708d17283855038c576a3c1796d7ed15ad050..69e149ed24aeeb863660d274fccef4c33b6ddef9 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -400,6 +400,41 @@ TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) {
EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
}
+TEST_F(PanelWindowResizerTest, AttachToSecondFullscreenDisplay) {
+ if (!SupportsMultipleDisplays())
+ return;
+
+ UpdateDisplay("600x400,600x600");
+ aura::Window::Windows root_windows = Shell::GetAllRootWindows();
+ scoped_ptr<aura::Window> window(
+ CreatePanelWindow(gfx::Point(0, 0)));
+ scoped_ptr<aura::Window> fullscreen(
+ CreateTestWindowInShellWithBounds(gfx::Rect(600, 0, 101, 101)));
+ wm::GetWindowState(fullscreen.get())->Activate();
+ wm::GetWindowState(fullscreen.get())->ToggleFullscreen();
+ EXPECT_TRUE(wm::GetWindowState(fullscreen.get())->IsFullscreen());
+
+ gfx::Rect initial_bounds = window->GetBoundsInScreen();
+ EXPECT_EQ(root_windows[0], window->GetRootWindow());
+
+ // Activate and drag the window to the other display's launcher.
+ wm::GetWindowState(window.get())->Activate();
+ DragStart(window.get());
+ DragMove(500, 250);
+ EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
+ EXPECT_GT(window->GetBoundsInScreen().y(),
+ initial_bounds.y() + 200);
+ DragEnd();
+
+ // When dropped should move to second display's panel container.
+ EXPECT_EQ(root_windows[1], window->GetRootWindow());
+ EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
+ EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
+ EXPECT_TRUE(window->IsVisible());
+ EXPECT_TRUE(wm::GetWindowState(window.get())->IsActive());
+ EXPECT_EQ(initial_bounds.y() + 200, window->GetBoundsInScreen().y());
+}
+
TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) {
scoped_ptr<aura::Window> window(
CreatePanelWindow(gfx::Point(0, 0)));
« no previous file with comments | « ash/wm/panels/panel_layout_manager.cc ('k') | ash/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698