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

Unified Diff: athena/wm/window_manager_unittest.cc

Issue 465803002: Make the minimized home card not overlap activities on Athena (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: athena/wm/window_manager_unittest.cc
diff --git a/athena/wm/window_manager_unittest.cc b/athena/wm/window_manager_unittest.cc
index 35ab704a1ccf1731e8cfbdbef4f53e156c16bda3..9150f0fed329715b019250c87c24589e2d4ce448 100644
--- a/athena/wm/window_manager_unittest.cc
+++ b/athena/wm/window_manager_unittest.cc
@@ -4,9 +4,40 @@
#include "athena/wm/public/window_manager.h"
+#include "athena/screen/public/screen_manager.h"
#include "athena/test/athena_test_base.h"
+#include "ui/aura/client/window_tree_client.h"
+#include "ui/aura/window.h"
+#include "ui/gfx/display.h"
+#include "ui/gfx/insets.h"
+#include "ui/gfx/screen.h"
-typedef athena::test::AthenaTestBase WindowManagerTest;
+namespace athena {
+
+typedef test::AthenaTestBase WindowManagerTest;
TEST_F(WindowManagerTest, Empty) {
}
+
+// Verifies that activities are created with the work area bounds.
+TEST_F(WindowManagerTest, NewActivityBounds) {
+ gfx::Insets work_area_insets(1, 2, 3, 4);
+ ScreenManager::Get()->SetWorkAreaInsets(work_area_insets);
+
+ aura::Window* window = new aura::Window(NULL);
+ window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
+ window->Init(aura::WINDOW_LAYER_TEXTURED);
+ aura::client::ParentWindowWithContext(
+ window, ScreenManager::Get()->GetContext(), gfx::Rect());
+ window->Show();
+
+ gfx::Display display = gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
+ gfx::Rect expected_work_area_bounds = display.bounds();
+ expected_work_area_bounds.Inset(work_area_insets);
+ EXPECT_EQ(expected_work_area_bounds.ToString(),
+ display.work_area().ToString());
+ EXPECT_EQ(expected_work_area_bounds.ToString(),
+ window->GetBoundsInScreen().ToString());
+}
+
+} // namespace athena

Powered by Google App Engine
This is Rietveld 408576698