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

Unified Diff: ash/wm/panel_layout_manager_unittest.cc

Issue 11363250: Allow Chrome apps to create Ash Panels (apps v2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac and win builds Created 8 years, 1 month 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/wm/panel_layout_manager.cc ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/panel_layout_manager_unittest.cc
diff --git a/ash/wm/panel_layout_manager_unittest.cc b/ash/wm/panel_layout_manager_unittest.cc
index 424fe0c13e3ac57e22ce3128e0b3e1944f6ca393..bbbbc92b08c49846cb4788c6e49e89425294e0c5 100644
--- a/ash/wm/panel_layout_manager_unittest.cc
+++ b/ash/wm/panel_layout_manager_unittest.cc
@@ -15,8 +15,9 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
-#include "ui/aura/window.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_windows.h"
+#include "ui/aura/window.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -297,5 +298,27 @@ TEST_F(PanelLayoutManagerTest, FanWindows) {
EXPECT_GT(spacing, icon_x2 - icon_x1);
}
+TEST_F(PanelLayoutManagerTest, MinimizeRestorePanel) {
+ gfx::Rect bounds(0, 0, 201, 201);
+ scoped_ptr<aura::Window> window(CreatePanelWindow(bounds));
+ // Activate the window, ensure callout is visible.
+ wm::ActivateWindow(window.get());
+ RunAllPendingInMessageLoop();
+ EXPECT_TRUE(IsCalloutVisible());
+ // Minimize the panel, callout should be hidden.
+ window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
+ RunAllPendingInMessageLoop();
+ EXPECT_FALSE(IsCalloutVisible());
+ // Restore the pantel; panel should not be activated by default and callout
+ // should be hidden.
+ window->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
+ RunAllPendingInMessageLoop();
+ EXPECT_FALSE(IsCalloutVisible());
+ // Activate the window, ensure callout is visible.
+ wm::ActivateWindow(window.get());
+ RunAllPendingInMessageLoop();
+ EXPECT_TRUE(IsCalloutVisible());
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/panel_layout_manager.cc ('k') | chrome/browser/extensions/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698