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

Side by Side Diff: chrome/browser/extensions/window_open_apitest.cc

Issue 10919046: Allow panels to be created as detached panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid panel_create_mode being unused_var in Ash Created 8 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 #define MAYBE_WindowOpenPanel FAILS_WindowOpenPanel 206 #define MAYBE_WindowOpenPanel FAILS_WindowOpenPanel
207 #else 207 #else
208 #define MAYBE_WindowOpenPanel WindowOpenPanel 208 #define MAYBE_WindowOpenPanel WindowOpenPanel
209 #endif 209 #endif
210 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, MAYBE_WindowOpenPanel) { 210 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, MAYBE_WindowOpenPanel) {
211 if (!PanelManager::UseBrowserlessPanels()) 211 if (!PanelManager::UseBrowserlessPanels())
212 return; 212 return;
213 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_; 213 ASSERT_TRUE(RunExtensionTest("window_open/panel")) << message_;
214 } 214 }
215 215
216 #if defined(USE_ASH)
217 // On Ash, this currently fails because we're currently opening new panel
218 // windows as popup windows instead.
219 #define MAYBE_WindowOpenPanelDetached FAILS_WindowOpenPanelDetached
220 #else
221 #define MAYBE_WindowOpenPanelDetached WindowOpenPanelDetached
222 #endif
223 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, MAYBE_WindowOpenPanelDetached) {
224 if (!PanelManager::UseBrowserlessPanels())
225 return;
226 ASSERT_TRUE(RunExtensionTest("window_open/panel_detached")) << message_;
227 }
228
216 #if defined(OS_MACOSX) || defined(OS_WIN) 229 #if defined(OS_MACOSX) || defined(OS_WIN)
217 // Focus test fails if there is no window manager on Linux. 230 // Focus test fails if there is no window manager on Linux.
218 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, WindowOpenFocus) { 231 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, WindowOpenFocus) {
219 if (!PanelManager::UseBrowserlessPanels()) 232 if (!PanelManager::UseBrowserlessPanels())
220 return; 233 return;
221 ASSERT_TRUE(RunExtensionTest("window_open/focus")) << message_; 234 ASSERT_TRUE(RunExtensionTest("window_open/focus")) << message_;
222 } 235 }
223 #endif 236 #endif
224 237
225 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest, 238 IN_PROC_BROWSER_TEST_F(WindowOpenPanelTest,
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 ASSERT_NO_FATAL_FAILURE(OpenWindow(chrome::GetActiveWebContents(browser()), 359 ASSERT_NO_FATAL_FAILURE(OpenWindow(chrome::GetActiveWebContents(browser()),
347 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ + 360 GURL(std::string("chrome-extension://") + last_loaded_extension_id_ +
348 "/newtab.html"), false, &newtab)); 361 "/newtab.html"), false, &newtab));
349 362
350 // Extension API should succeed. 363 // Extension API should succeed.
351 bool result = false; 364 bool result = false;
352 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool( 365 ASSERT_TRUE(content::ExecuteJavaScriptAndExtractBool(
353 newtab->GetRenderViewHost(), L"", L"testExtensionApi()", &result)); 366 newtab->GetRenderViewHost(), L"", L"testExtensionApi()", &result));
354 EXPECT_TRUE(result); 367 EXPECT_TRUE(result);
355 } 368 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_constants.cc ('k') | chrome/browser/task_manager/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698