| Index: ash/wm/window_util_unittest.cc
|
| diff --git a/ash/wm/window_util_unittest.cc b/ash/wm/window_util_unittest.cc
|
| index 5c18e6b58f85ae83b5281cad6be2cdd4e6c0fcb8..7c2e1e43d0ca5ed833bcff0454e7fff129d4bb80 100644
|
| --- a/ash/wm/window_util_unittest.cc
|
| +++ b/ash/wm/window_util_unittest.cc
|
| @@ -7,9 +7,12 @@
|
| #include "ash/aura/wm_window_aura.h"
|
| #include "ash/common/wm/window_positioning_utils.h"
|
| #include "ash/common/wm/window_state.h"
|
| +#include "ash/common/wm_window.h"
|
| +#include "ash/common/wm_window_property.h"
|
| #include "ash/screen_util.h"
|
| #include "ash/test/ash_test_base.h"
|
| #include "ash/wm/window_state_aura.h"
|
| +#include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/window.h"
|
|
|
| namespace ash {
|
| @@ -92,4 +95,21 @@ TEST_F(WindowUtilTest, AdjustBoundsToEnsureMinimumVisibility) {
|
| GetAdjustedBounds(visible_bounds_left, gfx::Rect(0, 0, 150, 150)));
|
| }
|
|
|
| +// Test that WmWindow can get a Rect property set by aura::Window
|
| +TEST_F(WindowUtilTest, RectPropertyTest) {
|
| + std::unique_ptr<aura::Window> window(
|
| + CreateTestWindowInShellWithBounds(gfx::Rect()));
|
| +
|
| + gfx::Rect* prop_rect = new gfx::Rect(0, 0, 100, 100);
|
| + window->SetProperty(aura::client::kVKNewBoundsKey, prop_rect);
|
| +
|
| + WmWindow* wm_window = WmWindowAura::Get(window.get());
|
| + EXPECT_EQ(wm_window->GetRectProperty(WmWindowProperty::VK_NEW_BOUNDS),
|
| + prop_rect);
|
| +
|
| + window->ClearProperty(aura::client::kVKNewBoundsKey);
|
| + EXPECT_EQ(wm_window->GetRectProperty(WmWindowProperty::VK_NEW_BOUNDS),
|
| + nullptr);
|
| +}
|
| +
|
| } // namespace ash
|
|
|