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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/memory/scoped_vector.h" | 6 #include "base/memory/scoped_vector.h" |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "chrome/browser/extensions/extension_apitest.h" | 8 #include "chrome/browser/extensions/extension_apitest.h" |
9 #include "chrome/browser/extensions/extension_test_message_listener.h" | 9 #include "chrome/browser/extensions/extension_test_message_listener.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 WaitForTabsAndPopups(browser(), 3, 1, 0); | 168 WaitForTabsAndPopups(browser(), 3, 1, 0); |
169 } | 169 } |
170 | 170 |
171 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { | 171 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { |
172 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; | 172 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; |
173 } | 173 } |
174 | 174 |
175 class WindowOpenPanelDisabledTest : public ExtensionApiTest { | 175 class WindowOpenPanelDisabledTest : public ExtensionApiTest { |
176 virtual void SetUpCommandLine(CommandLine* command_line) { | 176 virtual void SetUpCommandLine(CommandLine* command_line) { |
177 ExtensionApiTest::SetUpCommandLine(command_line); | 177 ExtensionApiTest::SetUpCommandLine(command_line); |
178 command_line->AppendSwitch(switches::kDisablePanels); | 178 // TODO(jennb): Re-enable when panels are enabled by default. |
| 179 // command_line->AppendSwitch(switches::kDisablePanels); |
179 } | 180 } |
180 }; | 181 }; |
181 | 182 |
182 IN_PROC_BROWSER_TEST_F(WindowOpenPanelDisabledTest, WindowOpenPanelNotEnabled) { | 183 IN_PROC_BROWSER_TEST_F(WindowOpenPanelDisabledTest, |
| 184 DISABLED_WindowOpenPanelNotEnabled) { |
183 ASSERT_TRUE(RunExtensionTest("window_open/panel_not_enabled")) << message_; | 185 ASSERT_TRUE(RunExtensionTest("window_open/panel_not_enabled")) << message_; |
184 } | 186 } |
185 | 187 |
186 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenPanel) { | 188 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenPanel) { |
187 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_; | 189 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_; |
188 } | 190 } |
189 | 191 |
190 #if defined(OS_MACOSX) || defined(OS_WIN) | 192 #if defined(OS_MACOSX) || defined(OS_WIN) |
191 // Focus test fails if there is no window manager on Linux. | 193 // Focus test fails if there is no window manager on Linux. |
192 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) { | 194 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpenFocus) { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 UninstallExtension(extension->id()); | 229 UninstallExtension(extension->id()); |
228 | 230 |
229 // Wait for one tab and one popup in non-extension domain to stay open. | 231 // Wait for one tab and one popup in non-extension domain to stay open. |
230 // Expect everything else, including panels, to close. | 232 // Expect everything else, including panels, to close. |
231 WaitForTabsAndPopups(browser(), 1, 1, 0); | 233 WaitForTabsAndPopups(browser(), 1, 1, 0); |
232 } | 234 } |
233 | 235 |
234 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpener) { | 236 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowOpener) { |
235 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; | 237 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; |
236 } | 238 } |
OLD | NEW |