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

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

Issue 8785009: Fix AutoResize test and restore origin constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f7e12e4fe8fac82afd99d9b0edbaa871ef6c0779..9f87768dc8105e34ef36b459256cbf124b8fd063 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -834,14 +834,10 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateSettingsMenu) {
"http://home", "options.html");
}
-#if defined(OS_WIN) || defined(OS_MACOSX)
-#define MAYBE_AutoResize AutoResize
-#else
-#define MAYBE_AutoResize FLAKY_AutoResize
-#endif
-IN_PROC_BROWSER_TEST_F(PanelBrowserTest, MAYBE_AutoResize) {
+IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) {
PanelManager::GetInstance()->enable_auto_sizing(true);
- set_testing_work_area(gfx::Rect(0, 0, 1200, 900));
jennb 2011/12/02 22:57:34 This doesn't change the work area. Just changes a
levin 2011/12/02 23:06:47 I wonder why this method exists. It appears to hav
jennb 2011/12/02 23:23:46 It's used in that test to set the value to 0 so th
+ PanelManager::GetInstance()->SetWorkAreaForTesting(
+ gfx::Rect(0, 0, 1200, 900)); // bigger space is needed by this test
// Create a test panel with tab contents loaded.
CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE);
@@ -859,7 +855,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, MAYBE_AutoResize) {
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
panel->browser()->GetSelectedTabContents()->render_view_host(),
std::wstring(),
- L"changeSize(10);"));
+ L"changeSize(50);"));
enlarge.Wait();
gfx::Rect bounds_on_grow = panel->GetBounds();
EXPECT_GT(bounds_on_grow.width(), initial_bounds.width());
@@ -872,7 +868,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, MAYBE_AutoResize) {
EXPECT_TRUE(ui_test_utils::ExecuteJavaScript(
panel->browser()->GetSelectedTabContents()->render_view_host(),
std::wstring(),
- L"changeSize(-5);"));
+ L"changeSize(-30);"));
shrink.Wait();
gfx::Rect bounds_on_shrink = panel->GetBounds();
EXPECT_LT(bounds_on_shrink.width(), bounds_on_grow.width());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698