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

Unified Diff: ash/wm/window_util_unittest.cc

Issue 2240353002: move switch Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Virtual keyboard non-sticky mode changes. Created 4 years, 4 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/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..db8ce35623bc52fcecd9bbc3bf3b9242e7942b88 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,22 @@ 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) {
+ UpdateDisplay("500x400, 600x400");
+ 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
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace/workspace_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698