| Index: chrome/browser/prefs/pref_service_browsertest.cc
|
| diff --git a/chrome/browser/prefs/pref_service_browsertest.cc b/chrome/browser/prefs/pref_service_browsertest.cc
|
| index da3556add01dc330a4c33e808eb7ba9a41255b6e..1aca9477e1b45fad97972987c85cce1679dd7127 100644
|
| --- a/chrome/browser/prefs/pref_service_browsertest.cc
|
| +++ b/chrome/browser/prefs/pref_service_browsertest.cc
|
| @@ -23,6 +23,10 @@
|
| #include "chrome/test/base/ui_test_utils.h"
|
| #include "ui/gfx/rect.h"
|
|
|
| +#if defined(USE_ASH)
|
| +#include "ash/wm/window_util.h"
|
| +#endif
|
| +
|
| // On GTK, resizing happens asynchronously and we currently don't have a way to
|
| // get called back (it's probably possible, but we don't have that code). Since
|
| // the GTK code is going away, not spending more time on this.
|
| @@ -31,14 +35,24 @@
|
| typedef InProcessBrowserTest PreservedWindowPlacement;
|
|
|
| IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, PRE_Test) {
|
| +#if defined(USE_ASH)
|
| + // The window needs to be tagged as user positioned, otherwise it would get
|
| + // re-positioned.
|
| + ash::wm::SetUserHasChangedWindowPositionOrSize(
|
| + browser()->window()->GetNativeWindow(),
|
| + true);
|
| +#endif
|
| browser()->window()->SetBounds(gfx::Rect(20, 30, 400, 500));
|
| }
|
|
|
| IN_PROC_BROWSER_TEST_F(PreservedWindowPlacement, Test) {
|
| gfx::Rect bounds = browser()->window()->GetBounds();
|
| -
|
| +#if defined(USE_ASH)
|
| + EXPECT_TRUE(ash::wm::HasUserChangedWindowPositionOrSize(
|
| + browser()->window()->GetNativeWindow()));
|
| +#endif
|
| gfx::Rect expected_bounds(gfx::Rect(20, 30, 400, 500));
|
| - ASSERT_EQ(expected_bounds, bounds);
|
| + ASSERT_EQ(expected_bounds.ToString(), bounds.ToString());
|
| }
|
|
|
| #endif // defined(TOOLKIT_GTK)
|
|
|