OLD | NEW |
---|---|
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 "base/string_number_conversions.h" | 6 #include "base/string_number_conversions.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/download/download_service.h" | 9 #include "chrome/browser/download/download_service.h" |
10 #include "chrome/browser/download/download_service_factory.h" | 10 #include "chrome/browser/download/download_service_factory.h" |
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
827 | 827 |
828 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateSettingsMenu) { | 828 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CreateSettingsMenu) { |
829 TestCreateSettingsMenuForExtension( | 829 TestCreateSettingsMenuForExtension( |
830 FILE_PATH_LITERAL("extension1"), Extension::EXTERNAL_POLICY_DOWNLOAD, | 830 FILE_PATH_LITERAL("extension1"), Extension::EXTERNAL_POLICY_DOWNLOAD, |
831 "", ""); | 831 "", ""); |
832 TestCreateSettingsMenuForExtension( | 832 TestCreateSettingsMenuForExtension( |
833 FILE_PATH_LITERAL("extension2"), Extension::INVALID, | 833 FILE_PATH_LITERAL("extension2"), Extension::INVALID, |
834 "http://home", "options.html"); | 834 "http://home", "options.html"); |
835 } | 835 } |
836 | 836 |
837 #if defined(OS_WIN) || defined(OS_MACOSX) | |
838 #define MAYBE_AutoResize AutoResize | |
839 #else | |
840 #define MAYBE_AutoResize FLAKY_AutoResize | |
841 #endif | |
837 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) { | 842 IN_PROC_BROWSER_TEST_F(PanelBrowserTest, AutoResize) { |
jennb
2011/11/28 19:59:09
Forgot MAYBE_ prefix
dcheng
2011/11/28 20:01:20
I fixed it when I actually landed it.
| |
838 PanelManager::GetInstance()->enable_auto_sizing(true); | 843 PanelManager::GetInstance()->enable_auto_sizing(true); |
839 set_testing_work_area(gfx::Rect(0, 0, 1200, 900)); | 844 set_testing_work_area(gfx::Rect(0, 0, 1200, 900)); |
840 | 845 |
841 // Create a test panel with tab contents loaded. | 846 // Create a test panel with tab contents loaded. |
842 CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE); | 847 CreatePanelParams params("PanelTest1", gfx::Rect(), SHOW_AS_ACTIVE); |
843 GURL url(ui_test_utils::GetTestUrl( | 848 GURL url(ui_test_utils::GetTestUrl( |
844 FilePath(kTestDir), | 849 FilePath(kTestDir), |
845 FilePath(FILE_PATH_LITERAL("update-preferred-size.html")))); | 850 FilePath(FILE_PATH_LITERAL("update-preferred-size.html")))); |
846 params.url = url; | 851 params.url = url; |
847 Panel* panel = CreatePanelWithParams(params); | 852 Panel* panel = CreatePanelWithParams(params); |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1883 // position when tall panel brings up its titlebar. | 1888 // position when tall panel brings up its titlebar. |
1884 CloseWindowAndWait(panel1->browser()); | 1889 CloseWindowAndWait(panel1->browser()); |
1885 EXPECT_EQ(balloon_bottom_after_tall_panel_titlebar_up, | 1890 EXPECT_EQ(balloon_bottom_after_tall_panel_titlebar_up, |
1886 GetBalloonBottomPosition(balloon)); | 1891 GetBalloonBottomPosition(balloon)); |
1887 | 1892 |
1888 // Closing the remaining tall panel should move the notification balloon back | 1893 // Closing the remaining tall panel should move the notification balloon back |
1889 // to its original position. | 1894 // to its original position. |
1890 CloseWindowAndWait(panel2->browser()); | 1895 CloseWindowAndWait(panel2->browser()); |
1891 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon)); | 1896 EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon)); |
1892 } | 1897 } |
OLD | NEW |