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

Unified Diff: chrome/browser/ui/panels/base_panel_browser_test.cc

Issue 11669018: Support dragging panels to stack and snap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CrOS build for relanding Created 7 years, 11 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 | « chrome/browser/ui/panels/base_panel_browser_test.h ('k') | chrome/browser/ui/panels/native_panel_stack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/base_panel_browser_test.cc
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 440ee628c837e4d8a76f969d6c3a280942db8236..fb425997005fe61a716795f45db05facdbb29ac4 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/ui/panels/native_panel.h"
#include "chrome/browser/ui/panels/panel_collection.h"
#include "chrome/browser/ui/panels/panel_mouse_watcher.h"
+#include "chrome/browser/ui/panels/stacked_panel_collection.h"
#include "chrome/browser/ui/panels/test_panel_active_state_observer.h"
#include "chrome/browser/ui/panels/test_panel_mouse_watcher.h"
#include "chrome/common/chrome_notification_types.h"
@@ -390,6 +391,18 @@ Panel* BasePanelBrowserTest::CreateDetachedPanel(const std::string& name,
return panel;
}
+Panel* BasePanelBrowserTest::CreateStackedPanel(const std::string& name,
+ const gfx::Rect& bounds,
+ StackedPanelCollection* stack) {
+ Panel* panel = CreateDetachedPanel(name, bounds);
+ panel->manager()->MovePanelToCollection(panel,
+ stack,
+ PanelCollection::DEFAULT_POSITION);
+ EXPECT_EQ(PanelCollection::STACKED, panel->collection()->type());
+ WaitForBoundsAnimationFinished(panel);
+ return panel;
+}
+
// static
NativePanelTesting* BasePanelBrowserTest::CreateNativePanelTesting(
Panel* panel) {
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.h ('k') | chrome/browser/ui/panels/native_panel_stack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698