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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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 "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/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/extensions/extension_apitest.h" 9 #include "chrome/browser/extensions/extension_apitest.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 "files/extensions/api_test/window_open/popup_blocking/hosted_app/"); 212 "files/extensions/api_test/window_open/popup_blocking/hosted_app/");
213 213
214 GURL open_tab = 214 GURL open_tab =
215 test_server()->GetURL(popup_app_contents_path + "open_tab.html") 215 test_server()->GetURL(popup_app_contents_path + "open_tab.html")
216 .ReplaceComponents(replace_host); 216 .ReplaceComponents(replace_host);
217 GURL open_popup = 217 GURL open_popup =
218 test_server()->GetURL(popup_app_contents_path + "open_popup.html") 218 test_server()->GetURL(popup_app_contents_path + "open_popup.html")
219 .ReplaceComponents(replace_host); 219 .ReplaceComponents(replace_host);
220 220
221 browser()->OpenURL(OpenURLParams( 221 browser()->OpenURL(OpenURLParams(
222 open_tab, Referrer(), NEW_FOREGROUND_TAB, content::PAGE_TRANSITION_TYPED, 222 open_tab, Referrer(), NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_TYPED,
223 false)); 223 false));
224 browser()->OpenURL(OpenURLParams( 224 browser()->OpenURL(OpenURLParams(
225 open_popup, Referrer(), NEW_FOREGROUND_TAB, 225 open_popup, Referrer(), NEW_FOREGROUND_TAB,
226 content::PAGE_TRANSITION_TYPED, false)); 226 ui::PAGE_TRANSITION_TYPED, false));
227 227
228 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1, 0)); 228 EXPECT_TRUE(WaitForTabsAndPopups(browser(), 3, 1, 0));
229 } 229 }
230 230
231 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) { 231 IN_PROC_BROWSER_TEST_F(ExtensionApiTest, WindowArgumentsOverflow) {
232 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_; 232 ASSERT_TRUE(RunExtensionTest("window_open/argument_overflow")) << message_;
233 } 233 }
234 234
235 class WindowOpenPanelDisabledTest : public ExtensionApiTest { 235 class WindowOpenPanelDisabledTest : public ExtensionApiTest {
236 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 236 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 last_loaded_extension_id() + "/newtab.html"), 504 last_loaded_extension_id() + "/newtab.html"),
505 false, 505 false,
506 &newtab)); 506 &newtab));
507 507
508 // Extension API should succeed. 508 // Extension API should succeed.
509 bool result = false; 509 bool result = false;
510 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()", 510 ASSERT_TRUE(content::ExecuteScriptAndExtractBool(newtab, "testExtensionApi()",
511 &result)); 511 &result));
512 EXPECT_TRUE(result); 512 EXPECT_TRUE(result);
513 } 513 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698