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

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

Issue 15950011: content: Move kViewSourceScheme constant into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 "chrome/browser/ui/browser_navigator_browsertest.h" 5 #include "chrome/browser/ui/browser_navigator_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/prefs/incognito_mode_prefs.h" 10 #include "chrome/browser/prefs/incognito_mode_prefs.h"
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 919 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
920 DISABLED_Disposition_Settings_UseNonIncognitoWindow) { 920 DISABLED_Disposition_Settings_UseNonIncognitoWindow) {
921 RunUseNonIncognitoWindowTest(GetSettingsURL()); 921 RunUseNonIncognitoWindowTest(GetSettingsURL());
922 } 922 }
923 923
924 // This test verifies that the view-source settings page isn't opened in the 924 // This test verifies that the view-source settings page isn't opened in the
925 // incognito window. 925 // incognito window.
926 IN_PROC_BROWSER_TEST_F( 926 IN_PROC_BROWSER_TEST_F(
927 BrowserNavigatorTest, 927 BrowserNavigatorTest,
928 Disposition_ViewSource_Settings_DoNothingIfIncognitoForced) { 928 Disposition_ViewSource_Settings_DoNothingIfIncognitoForced) {
929 std::string view_source(chrome::kViewSourceScheme); 929 std::string view_source(content::kViewSourceScheme);
930 view_source.append(":"); 930 view_source.append(":");
931 view_source.append(chrome::kChromeUISettingsURL); 931 view_source.append(chrome::kChromeUISettingsURL);
932 RunDoNothingIfIncognitoIsForcedTest(GURL(view_source)); 932 RunDoNothingIfIncognitoIsForcedTest(GURL(view_source));
933 } 933 }
934 934
935 // This test verifies that the view-source settings page isn't opened in the 935 // This test verifies that the view-source settings page isn't opened in the
936 // incognito window even if incognito mode is forced (does nothing in that 936 // incognito window even if incognito mode is forced (does nothing in that
937 // case). 937 // case).
938 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 938 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
939 Disposition_ViewSource_Settings_UseNonIncognitoWindow) { 939 Disposition_ViewSource_Settings_UseNonIncognitoWindow) {
940 std::string view_source(chrome::kViewSourceScheme); 940 std::string view_source(content::kViewSourceScheme);
941 view_source.append(":"); 941 view_source.append(":");
942 view_source.append(chrome::kChromeUISettingsURL); 942 view_source.append(chrome::kChromeUISettingsURL);
943 RunUseNonIncognitoWindowTest(GURL(view_source)); 943 RunUseNonIncognitoWindowTest(GURL(view_source));
944 } 944 }
945 945
946 // This test verifies that the settings page isn't opened in the incognito 946 // This test verifies that the settings page isn't opened in the incognito
947 // window from a non-incognito window (bookmark open-in-incognito trigger). 947 // window from a non-incognito window (bookmark open-in-incognito trigger).
948 // Disabled until fixed for uber settings: http://crbug.com/111243 948 // Disabled until fixed for uber settings: http://crbug.com/111243
949 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, 949 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest,
950 DISABLED_Disposition_Settings_UseNonIncognitoWindowForBookmark) { 950 DISABLED_Disposition_Settings_UseNonIncognitoWindowForBookmark) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 // is created. 1283 // is created.
1284 chrome::NavigateParams params_incognito( 1284 chrome::NavigateParams params_incognito(
1285 browser()->profile()->GetOffTheRecordProfile(), 1285 browser()->profile()->GetOffTheRecordProfile(),
1286 GetGoogleURL(), content::PAGE_TRANSITION_LINK); 1286 GetGoogleURL(), content::PAGE_TRANSITION_LINK);
1287 ui_test_utils::NavigateToURL(&params_incognito); 1287 ui_test_utils::NavigateToURL(&params_incognito);
1288 EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); 1288 EXPECT_EQ(2u, chrome::GetTotalBrowserCount());
1289 } 1289 }
1290 1290
1291 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ViewSourceIsntSingleton) { 1291 IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, ViewSourceIsntSingleton) {
1292 const std::string viewsource_ntp_url = 1292 const std::string viewsource_ntp_url =
1293 std::string(chrome::kViewSourceScheme) + ":" + 1293 std::string(content::kViewSourceScheme) + ":" +
1294 chrome::kChromeUIVersionURL; 1294 chrome::kChromeUIVersionURL;
1295 1295
1296 chrome::NavigateParams viewsource_params(browser(), 1296 chrome::NavigateParams viewsource_params(browser(),
1297 GURL(viewsource_ntp_url), 1297 GURL(viewsource_ntp_url),
1298 content::PAGE_TRANSITION_LINK); 1298 content::PAGE_TRANSITION_LINK);
1299 ui_test_utils::NavigateToURL(&viewsource_params); 1299 ui_test_utils::NavigateToURL(&viewsource_params);
1300 1300
1301 chrome::NavigateParams singleton_params(browser(), 1301 chrome::NavigateParams singleton_params(browser(),
1302 GURL(chrome::kChromeUIVersionURL), 1302 GURL(chrome::kChromeUIVersionURL),
1303 content::PAGE_TRANSITION_LINK); 1303 content::PAGE_TRANSITION_LINK);
1304 singleton_params.disposition = SINGLETON_TAB; 1304 singleton_params.disposition = SINGLETON_TAB;
1305 EXPECT_EQ(-1, chrome::GetIndexOfSingletonTab(&singleton_params)); 1305 EXPECT_EQ(-1, chrome::GetIndexOfSingletonTab(&singleton_params));
1306 } 1306 }
1307 1307
1308 } // namespace 1308 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/cocoa/applescript/tab_applescript.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698