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

Side by Side Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 7966026: Reverting this change to see if this fixes the MinimizeRestore browser tests on Vista and XP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "chrome/browser/net/url_request_mock_util.h" 6 #include "chrome/browser/net/url_request_mock_util.h"
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #include "chrome/browser/ui/browser_window.h" 10 #include "chrome/browser/ui/browser_window.h"
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask()); 817 MessageLoop::current()->PostTask(FROM_HERE, new MessageLoop::QuitTask());
818 MessageLoop::current()->RunAllPending(); 818 MessageLoop::current()->RunAllPending();
819 } 819 }
820 EXPECT_LT(bounds_on_shrink.width(), bounds_on_grow.width()); 820 EXPECT_LT(bounds_on_shrink.width(), bounds_on_grow.width());
821 EXPECT_GT(bounds_on_shrink.width(), initial_bounds.width()); 821 EXPECT_GT(bounds_on_shrink.width(), initial_bounds.width());
822 EXPECT_EQ(bounds_on_shrink.height(), initial_bounds.height()); 822 EXPECT_EQ(bounds_on_shrink.height(), initial_bounds.height());
823 823
824 panel->Close(); 824 panel->Close();
825 } 825 }
826 826
827 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, MinimizeRestore) { 827 #if defined(TOOLKIT_GTK) || defined(OS_MACOSX)
828 #define MAYBE_MinimizeRestore MinimizeRestore
829 #else
830 #define MAYBE_MinimizeRestore DISABLED_MinimizeRestore
831 #endif
832
833 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, MAYBE_MinimizeRestore) {
828 // Disable mouse watcher. We'll simulate mouse movements for test. 834 // Disable mouse watcher. We'll simulate mouse movements for test.
829 NativePanelTesting::GetPanelMouseWatcherInstance()->EnableTestingMode(); 835 NativePanelTesting::GetPanelMouseWatcherInstance()->EnableTestingMode();
830 836
831 // Test with one panel. 837 // Test with one panel.
832 CreatePanelWithBounds("PanelTest1", gfx::Rect(0, 0, 100, 100)); 838 CreatePanelWithBounds("PanelTest1", gfx::Rect(0, 0, 100, 100));
833 TestMinimizeRestore(); 839 TestMinimizeRestore();
834 840
835 // Test with two panels. 841 // Test with two panels.
836 CreatePanelWithBounds("PanelTest2", gfx::Rect(0, 0, 110, 110)); 842 CreatePanelWithBounds("PanelTest2", gfx::Rect(0, 0, 110, 110));
837 TestMinimizeRestore(); 843 TestMinimizeRestore();
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 EXPECT_EQ(1, tabbed_browser->tab_count()); 1015 EXPECT_EQ(1, tabbed_browser->tab_count());
1010 ASSERT_TRUE(tabbed_browser->window()->IsDownloadShelfVisible()); 1016 ASSERT_TRUE(tabbed_browser->window()->IsDownloadShelfVisible());
1011 tabbed_browser->CloseWindow(); 1017 tabbed_browser->CloseWindow();
1012 #endif 1018 #endif
1013 1019
1014 EXPECT_EQ(1, panel_browser->tab_count()); 1020 EXPECT_EQ(1, panel_browser->tab_count());
1015 ASSERT_FALSE(panel_browser->window()->IsDownloadShelfVisible()); 1021 ASSERT_FALSE(panel_browser->window()->IsDownloadShelfVisible());
1016 1022
1017 panel_browser->CloseWindow(); 1023 panel_browser->CloseWindow();
1018 } 1024 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_view_browsertest.cc ('k') | chrome/browser/ui/panels/panel_mouse_watcher_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698