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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 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
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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/memory/scoped_vector.h" 7 #include "base/memory/scoped_vector.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 const std::string popup_app_contents_path( 184 const std::string popup_app_contents_path(
185 "/extensions/api_test/window_open/popup_blocking/hosted_app/"); 185 "/extensions/api_test/window_open/popup_blocking/hosted_app/");
186 186
187 GURL open_tab = embedded_test_server() 187 GURL open_tab = embedded_test_server()
188 ->GetURL(popup_app_contents_path + "open_tab.html") 188 ->GetURL(popup_app_contents_path + "open_tab.html")
189 .ReplaceComponents(replace_host); 189 .ReplaceComponents(replace_host);
190 GURL open_popup = embedded_test_server() 190 GURL open_popup = embedded_test_server()
191 ->GetURL(popup_app_contents_path + "open_popup.html") 191 ->GetURL(popup_app_contents_path + "open_popup.html")
192 .ReplaceComponents(replace_host); 192 .ReplaceComponents(replace_host);
193 193
194 browser()->OpenURL(OpenURLParams( 194 browser()->OpenURL(OpenURLParams(open_tab, Referrer(),
195 open_tab, Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED, 195 WindowOpenDisposition::NEW_FOREGROUND_TAB,
196 false)); 196 ui::PAGE_TRANSITION_TYPED, false));
197 browser()->OpenURL(OpenURLParams( 197 browser()->OpenURL(OpenURLParams(open_popup, Referrer(),
198 open_popup, Referrer(), NEW_FOREGROUND_TAB, 198 WindowOpenDisposition::NEW_FOREGROUND_TAB,
199 ui::PAGE_TRANSITION_TYPED, false)); 199 ui::PAGE_TRANSITION_TYPED, false));
200 200
201 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1)); 201 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1));
202 } 202 }
203 203
204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { 204 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) {
205 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; 205 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_;
206 } 206 }
207 207
208 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) { 208 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, DISABLED_WindowOpener) {
209 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_; 209 ASSERT_TRUE(RunExtensionTest("window_open/opener")) << message_;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 last_loaded_extension_id() + "/newtab.html"), 278 last_loaded_extension_id() + "/newtab.html"),
279 false, 279 false,
280 &newtab)); 280 &newtab));
281 281
282 // Extension API should succeed. 282 // Extension API should succeed.
283 bool result = false; 283 bool result = false;
284 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()", 284 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()",
285 &result)); 285 &result));
286 EXPECT_TRUE(result); 286 EXPECT_TRUE(result);
287 } 287 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/webstore_inline_installer_browsertest.cc ('k') | chrome/browser/fast_shutdown_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698