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

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

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 8 years, 9 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: 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 1bce3a340c34c77dfdd108e1cd0a569053ea6762..0429173ec4e48dc0001fa6c4ecd032ae1e2996f5 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -396,6 +396,39 @@ Panel* BasePanelBrowserTest::CreatePanel(const std::string& panel_name) {
return CreatePanelWithParams(params);
}
+Panel* BasePanelBrowserTest::CreateDockedPanel(const std::string& name,
+ const gfx::Rect& bounds) {
+ Panel* panel = CreatePanelWithBounds(name, bounds);
+ EXPECT_EQ(PanelStrip::DOCKED, panel->panel_strip()->type());
+ return panel;
+}
+
+Panel* BasePanelBrowserTest::CreateDetachedPanel(const std::string& name,
+ const gfx::Rect& bounds) {
+ Panel* panel = CreatePanelWithBounds(name, bounds);
+ panel->manager()->MovePanelToStrip(panel,
+ PanelStrip::DETACHED,
+ PanelStrip::DEFAULT_POSITION);
+ EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type());
+ // The panel is first created as docked panel, which ignores the specified
+ // origin in |bounds|. We need to reposition the panel after it becomes
+ // detached.
+ panel->SetPanelBounds(bounds);
+ WaitForBoundsAnimationFinished(panel);
+ return panel;
+}
+
+Panel* BasePanelBrowserTest::CreateOverflowPanel(const std::string& name,
+ const gfx::Rect& bounds) {
+ // The overflow panel is always shown as inactive even though we pass
+ // SHOW_AS_ACTIVE.
+ CreatePanelParams params(name, bounds, SHOW_AS_ACTIVE);
+ params.expected_active_state = SHOW_AS_INACTIVE;
+ Panel* panel = CreatePanelWithParams(params);
+ WaitForLayoutModeChanged(panel, PanelStrip::IN_OVERFLOW);
+ return panel;
+}
+
void BasePanelBrowserTest::CreateTestTabContents(Browser* browser) {
TabContentsWrapper* tab_contents =
new TabContentsWrapper(new TestTabContents(browser->profile(), NULL));
« no previous file with comments | « chrome/browser/ui/panels/base_panel_browser_test.h ('k') | chrome/browser/ui/panels/detached_panel_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698