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

Side by Side Diff: chrome/browser/ui/browser_browsertest.cc

Issue 23112033: content: Move kHttpsScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 }; 189 };
190 190
191 // Causes the browser to swap processes on a redirect to an HTTPS URL. 191 // Causes the browser to swap processes on a redirect to an HTTPS URL.
192 class TransferHttpsRedirectsContentBrowserClient 192 class TransferHttpsRedirectsContentBrowserClient
193 : public chrome::ChromeContentBrowserClient { 193 : public chrome::ChromeContentBrowserClient {
194 public: 194 public:
195 virtual bool ShouldSwapProcessesForRedirect( 195 virtual bool ShouldSwapProcessesForRedirect(
196 content::ResourceContext* resource_context, 196 content::ResourceContext* resource_context,
197 const GURL& current_url, 197 const GURL& current_url,
198 const GURL& new_url) OVERRIDE { 198 const GURL& new_url) OVERRIDE {
199 return new_url.SchemeIs(chrome::kHttpsScheme); 199 return new_url.SchemeIs(content::kHttpsScheme);
200 } 200 }
201 }; 201 };
202 202
203 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser. 203 // Used by CloseWithAppMenuOpen. Invokes CloseWindow on the supplied browser.
204 void CloseWindowCallback(Browser* browser) { 204 void CloseWindowCallback(Browser* browser) {
205 chrome::CloseWindow(browser); 205 chrome::CloseWindow(browser);
206 } 206 }
207 207
208 // Used by CloseWithAppMenuOpen. Posts a CloseWindowCallback and shows the app 208 // Used by CloseWithAppMenuOpen. Posts a CloseWindowCallback and shows the app
209 // menu. 209 // menu.
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 864
865 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttps) { 865 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttps) {
866 CommandUpdater* command_updater = 866 CommandUpdater* command_updater =
867 browser()->command_controller()->command_updater(); 867 browser()->command_controller()->command_updater();
868 868
869 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_HTTPS, 869 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_HTTPS,
870 net::SpawnedTestServer::kLocalhost, 870 net::SpawnedTestServer::kLocalhost,
871 base::FilePath(kDocRoot)); 871 base::FilePath(kDocRoot));
872 ASSERT_TRUE(test_server.Start()); 872 ASSERT_TRUE(test_server.Start());
873 GURL https_url(test_server.GetURL("/")); 873 GURL https_url(test_server.GetURL("/"));
874 ASSERT_TRUE(https_url.SchemeIs(chrome::kHttpsScheme)); 874 ASSERT_TRUE(https_url.SchemeIs(content::kHttpsScheme));
875 ui_test_utils::NavigateToURL(browser(), https_url); 875 ui_test_utils::NavigateToURL(browser(), https_url);
876 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); 876 EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS));
877 } 877 }
878 878
879 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFtp) { 879 IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutFtp) {
880 CommandUpdater* command_updater = 880 CommandUpdater* command_updater =
881 browser()->command_controller()->command_updater(); 881 browser()->command_controller()->command_updater();
882 882
883 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_FTP, 883 net::SpawnedTestServer test_server(net::SpawnedTestServer::TYPE_FTP,
884 net::SpawnedTestServer::kLocalhost, 884 net::SpawnedTestServer::kLocalhost,
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
2236 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2236 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2237 } 2237 }
2238 2238
2239 // Shift-middle-clicks open in a foreground tab. 2239 // Shift-middle-clicks open in a foreground tab.
2240 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) { 2240 IN_PROC_BROWSER_TEST_F(ClickModifierTest, HrefShiftMiddleClickTest) {
2241 int modifiers = WebKit::WebInputEvent::ShiftKey; 2241 int modifiers = WebKit::WebInputEvent::ShiftKey;
2242 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle; 2242 WebKit::WebMouseEvent::Button button = WebKit::WebMouseEvent::ButtonMiddle;
2243 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB; 2243 WindowOpenDisposition disposition = NEW_FOREGROUND_TAB;
2244 RunTest(browser(), GetHrefURL(), modifiers, button, disposition); 2244 RunTest(browser(), GetHrefURL(), modifiers, button, disposition);
2245 } 2245 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | chrome/browser/web_applications/web_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698