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

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

Issue 8602007: Panels: Disable auto-resize if initial size is specified during creation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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
Index: chrome/browser/ui/panels/panel_browsertest.cc
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index 5f2db43a9e57648d4d3176b58b6199a869a23a14..d57db8c9fdd4ffeadfc27bd868c7cdf3fb8d24d1 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -838,8 +838,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) {
PanelManager::GetInstance()->enable_auto_sizing(true);
// Create a test panel with tab contents loaded.
- CreatePanelParams params("PanelTest1", gfx::Rect(0, 0, 100, 100),
- SHOW_AS_ACTIVE);
+ CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE);
params.url = GURL(chrome::kAboutBlankURL);
Panel* panel = CreatePanelWithParams(params);
@@ -849,11 +848,8 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) {
FilePath(FILE_PATH_LITERAL("update-preferred-size.html"))));
ui_test_utils::NavigateToURL(panel->browser(), url);
- gfx::Rect initial_bounds = panel->GetBounds();
- EXPECT_LE(100, initial_bounds.width());
- EXPECT_LE(100, initial_bounds.height());
-
// Expand the test page.
+ gfx::Rect initial_bounds = panel->GetBounds();
ui_test_utils::WindowedNotificationObserver enlarge(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));
@@ -1460,8 +1456,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateWithExistingContents) {
EXPECT_EQ(1, browser()->tab_count());
Profile* profile = browser()->profile();
- CreatePanelParams params("PanelTest1", gfx::Rect(0, 0, 100, 100),
- SHOW_AS_ACTIVE);
+ CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE);
Panel* panel = CreatePanelWithParams(params);
Browser* panel_browser = panel->browser();
EXPECT_EQ(2U, BrowserList::size());
@@ -1479,9 +1474,6 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateWithExistingContents) {
// verifying that the panel auto resizes correctly. (Panel
// enables auto resizing when tab contents are detected.)
int initial_width = panel->GetBounds().width();
- EXPECT_LE(100, initial_width);
-
- // Expand the test page.
ui_test_utils::WindowedNotificationObserver enlarge(
chrome::NOTIFICATION_PANEL_BOUNDS_ANIMATIONS_FINISHED,
content::Source<Panel>(panel));

Powered by Google App Engine
This is Rietveld 408576698