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

Unified Diff: ash/wm/window_positioner_unittest.cc

Issue 107273002: Merge 236134 "Ensure that the first browser window which is crea..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1700/src/
Patch Set: 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/window_positioner_unittest.cc
===================================================================
--- ash/wm/window_positioner_unittest.cc (revision 239045)
+++ ash/wm/window_positioner_unittest.cc (working copy)
@@ -7,6 +7,7 @@
#include "ash/shell.h"
#include "ash/shell/toplevel_window.h"
#include "ash/test/ash_test_base.h"
+#include "ash/wm/window_positioner.h"
#include "ash/wm/window_state.h"
#include "ui/aura/root_window.h"
#include "ui/gfx/screen.h"
@@ -34,6 +35,9 @@
TEST_F(WindowPositionerTest, OpenDefaultWindowOnSecondDisplay) {
if (!SupportsMultipleDisplays())
return;
+#if defined(OS_WIN)
+ ash::WindowPositioner::SetMaximizeFirstWindow(true);
+#endif
UpdateDisplay("400x400,1400x900");
aura::Window* second_root_window = Shell::GetAllRootWindows()[1];
Shell::GetInstance()->set_target_root_window(
@@ -44,8 +48,12 @@
views::Widget* widget =
shell::ToplevelWindow::CreateToplevelWindow(params);
gfx::Rect bounds = widget->GetWindowBoundsInScreen();
+#if defined(OS_WIN)
+ EXPECT_TRUE(widget->IsMaximized());
+#else
// The window should be in the 2nd display with the default size.
EXPECT_EQ("300x300", bounds.size().ToString());
+#endif
EXPECT_TRUE(Shell::GetScreen()->GetDisplayNearestWindow(
second_root_window).bounds().Contains(bounds));
}
« no previous file with comments | « ash/wm/window_positioner.cc ('k') | chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698